OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 Google Inc. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include <windows.h> | |
6 #include <wrl.h> | |
7 #include <wrl/wrappers/corewrappers.h> | |
8 #include <windows.graphics.display.h> | |
9 | |
10 using namespace Microsoft::WRL; | |
11 using namespace Microsoft::WRL::Wrappers; | |
12 using namespace ABI::Windows::Foundation; | |
13 using namespace ABI::Windows::Graphics::Display; | |
14 | |
15 bool TryToUseSomeWinRT() | |
scottmg
2014/09/23 00:01:13
nit; please reformat this to the standard style (p
| |
16 { | |
17 ComPtr<IDisplayPropertiesStatics> dp; | |
scottmg
2014/09/23 00:01:13
This code isn't being run in the test, afaict. Doe
| |
18 HStringReference s(RuntimeClass_Windows_Graphics_Display_DisplayProperties); | |
19 HRESULT hr = GetActivationFactory(s.Get(), dp.GetAddressOf()); | |
20 if (SUCCEEDED(hr)) | |
21 { | |
22 float dpi = 96.0f; | |
23 if (SUCCEEDED(dp->get_LogicalDpi(&dpi))) | |
24 { | |
25 return true; | |
26 } | |
27 } | |
28 return false; | |
29 } | |
30 | |
31 BOOL WINAPI DllMain(HINSTANCE hinstance, DWORD reason, LPVOID reserved) { | |
32 return TRUE; | |
33 } | |
OLD | NEW |