Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(627)

Side by Side Diff: base/win/pe_image_test.cc

Issue 1370843003: Remove warning pragmas in pe_image.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use ScopedNativeLibrary Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « base/win/pe_image.cc ('k') | base/win/pe_image_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #pragma comment(linker, "/export:FwdExport=KERNEL32.CreateFileA")
11
10 extern "C" { 12 extern "C" {
11 13
12 __declspec(dllexport) void ExportFunc1() { 14 __declspec(dllexport) void ExportFunc1() {
13 // Call into user32.dll. 15 // Call into user32.dll.
14 HWND dummy = GetDesktopWindow(); 16 HWND dummy = GetDesktopWindow();
15 SetWindowTextA(dummy, "dummy"); 17 SetWindowTextA(dummy, "dummy");
16 } 18 }
17 19
18 __declspec(dllexport) void ExportFunc2() { 20 __declspec(dllexport) void ExportFunc2() {
19 // Call into cfgmgr32.dll. 21 // Call into cfgmgr32.dll.
20 CM_MapCrToWin32Err(CR_SUCCESS, ERROR_SUCCESS); 22 CM_MapCrToWin32Err(CR_SUCCESS, ERROR_SUCCESS);
21 23
22 // Call into shell32.dll. 24 // Call into shell32.dll.
23 SHFILEOPSTRUCT file_operation = {0}; 25 SHFILEOPSTRUCT file_operation = {0};
24 SHFileOperation(&file_operation); 26 SHFileOperation(&file_operation);
25 27
26 // Call into kernel32.dll. 28 // Call into kernel32.dll.
27 HANDLE h = CreateEvent(NULL, FALSE, FALSE, NULL); 29 HANDLE h = CreateEvent(NULL, FALSE, FALSE, NULL);
28 CloseHandle(h); 30 CloseHandle(h);
29 } 31 }
30 32
31 } // extern "C" 33 } // extern "C"
OLDNEW
« no previous file with comments | « base/win/pe_image.cc ('k') | base/win/pe_image_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698