From d467ae6e7867044b8d7b466776fb37089292c52b Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Fri, 4 Dec 2015 13:29:51 -0500 Subject: [core] upgrade gyp to git commit 6fb8bd8 https://chromium.googlesource.com/external/gyp/+/6fb8bd829f0ca8fd432fd85ede788b6881c4f09f --- deps/gyp/test/win/enable-winrt/dllmain.cc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 deps/gyp/test/win/enable-winrt/dllmain.cc (limited to 'deps/gyp/test/win/enable-winrt/dllmain.cc') diff --git a/deps/gyp/test/win/enable-winrt/dllmain.cc b/deps/gyp/test/win/enable-winrt/dllmain.cc new file mode 100644 index 0000000000..dedd83c3f6 --- /dev/null +++ b/deps/gyp/test/win/enable-winrt/dllmain.cc @@ -0,0 +1,30 @@ +// Copyright (c) 2013 Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include +#include +#include +#include + +using namespace Microsoft::WRL; +using namespace Microsoft::WRL::Wrappers; +using namespace ABI::Windows::Foundation; +using namespace ABI::Windows::Graphics::Display; + +bool TryToUseSomeWinRT() { + ComPtr dp; + HStringReference s(RuntimeClass_Windows_Graphics_Display_DisplayProperties); + HRESULT hr = GetActivationFactory(s.Get(), dp.GetAddressOf()); + if (SUCCEEDED(hr)) { + float dpi = 96.0f; + if (SUCCEEDED(dp->get_LogicalDpi(&dpi))) { + return true; + } + } + return false; +} + +BOOL WINAPI DllMain(HINSTANCE hinstance, DWORD reason, LPVOID reserved) { + return TRUE; +} -- cgit v1.2.1