OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <windows.h> | 5 #include <windows.h> |
6 | 6 |
7 #include <cfgmgr32.h> | 7 #include <cfgmgr32.h> |
8 #include <shellapi.h> | 8 #include <shellapi.h> |
9 | 9 |
10 extern "C" { | 10 extern "C" { |
11 | 11 |
12 __declspec(dllexport) void ExportFunc1() { | 12 __declspec(dllexport) void ExportFunc1() { |
13 // Call into user32.dll. | 13 // Call into user32.dll. |
14 HWND dummy = GetDesktopWindow(); | 14 HWND dummy = GetDesktopWindow(); |
15 SetWindowTextA(dummy, "dummy"); | 15 SetWindowTextA(dummy, "dummy"); |
16 } | 16 } |
17 | 17 |
18 __declspec(dllexport) void ExportFunc2() { | 18 __declspec(dllexport) void ExportFunc2() { |
19 // Call into cfgmgr32.dll. | 19 // Call into cfgmgr32.dll. |
20 CM_MapCrToWin32Err(CR_SUCCESS, ERROR_SUCCESS); | 20 CM_MapCrToWin32Err(CR_SUCCESS, ERROR_SUCCESS); |
21 | 21 |
22 // Call into shell32.dll. | 22 // Call into shell32.dll. |
23 SHFILEOPSTRUCT file_operation = {0}; | 23 SHFILEOPSTRUCT file_operation = {0}; |
24 SHFileOperation(&file_operation); | 24 SHFileOperation(&file_operation); |
25 | 25 |
26 // Call into kernel32.dll. | 26 // Call into kernel32.dll. |
27 HANDLE h = CreateEvent(NULL, FALSE, FALSE, NULL); | 27 HANDLE h = CreateEvent(NULL, FALSE, FALSE, NULL); |
28 CloseHandle(h); | 28 CHECK(::CloseHandle(h)); |
rvargas (doing something else)
2015/09/16 02:09:12
This is never executed, so I would not change this
brucedawson
2015/09/16 18:29:00
Ignore this change. I'm reverting it. The CHECK do
brucedawson
2015/09/16 18:29:00
Done.
| |
29 } | 29 } |
30 | 30 |
31 } // extern "C" | 31 } // extern "C" |
OLD | NEW |