diff options
| author | David Spruill <[email protected]> | 2026-01-08 17:51:47 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-01-08 17:51:47 -0500 |
| commit | c5fc3ca1fd0e00a7e085ef48abfeff9c0c39817e (patch) | |
| tree | 0e650a0fee8027816bbea82ca1fd9b8e3e6ee24a /general/WinHEC 2017 Lab/Toaster Support App/App/CustomCapability/cpp/pch.cpp | |
| parent | f88e4fbbd4d2671e5cd77e4f60be7a235326797e (diff) | |
| parent | ed3dbe56378117a15105099870f2397671ad99ab (diff) | |
Merge branch 'develop' into user/daspr/kmodsamplefix
Diffstat (limited to 'general/WinHEC 2017 Lab/Toaster Support App/App/CustomCapability/cpp/pch.cpp')
| -rw-r--r-- | general/WinHEC 2017 Lab/Toaster Support App/App/CustomCapability/cpp/pch.cpp | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/general/WinHEC 2017 Lab/Toaster Support App/App/CustomCapability/cpp/pch.cpp b/general/WinHEC 2017 Lab/Toaster Support App/App/CustomCapability/cpp/pch.cpp deleted file mode 100644 index b300c4c0..00000000 --- a/general/WinHEC 2017 Lab/Toaster Support App/App/CustomCapability/cpp/pch.cpp +++ /dev/null @@ -1,60 +0,0 @@ -//********************************************************* -// -// Copyright (c) Microsoft. All rights reserved. -// This code is licensed under the MIT License (MIT). -// THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF -// ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY -// IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR -// PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. -// -//********************************************************* - -// -// pch.cpp -// Include the standard header and generate the precompiled header. -// - -#include "pch.h" -#include "MainPage.xaml.h" - -#include <robuffer.h> -#include <wrl\client.h> - -using namespace Microsoft::WRL; -using namespace Windows::Storage::Streams; - -byte* GetArrayFromBuffer(Windows::Storage::Streams::IBuffer^ buffer) -{ - ComPtr<IInspectable> base = reinterpret_cast<IInspectable*>(buffer); - ComPtr<IBufferByteAccess> access; - - auto hr = base.As(&access); - - if (FAILED(hr)) - { - throw Platform::Exception::CreateException(hr); - } - - byte* data; - - hr = access->Buffer(&data); - - if (FAILED(hr)) - { - throw Platform::Exception::CreateException(hr); - } - - // The returned buffer is valid as long as the IBuffer passed in - // remains valid. - return data; -} - -void NotifyStatusMessage(Platform::String^ message, SDKTemplate::NotifyType messageType) -{ - SDKTemplate::MainPage::Current->Dispatcher->RunAsync( - Windows::UI::Core::CoreDispatcherPriority::Normal, - ref new Windows::UI::Core::DispatchedHandler( - [message, messageType]() { - SDKTemplate::MainPage::Current->NotifyUser(message, messageType); - })); -} |
