| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "cloud_print/virtual_driver/win/virtual_driver_helpers.h" | 5 #include "cloud_print/virtual_driver/win/virtual_driver_helpers.h" |
| 6 #include <windows.h> | 6 #include <windows.h> |
| 7 #include <winspool.h> | 7 #include <winspool.h> |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 | 31 |
| 32 HRESULT GetLastHResult() { | 32 HRESULT GetLastHResult() { |
| 33 DWORD error_code = GetLastError(); | 33 DWORD error_code = GetLastError(); |
| 34 return HRESULT_FROM_WIN32(error_code); | 34 return HRESULT_FROM_WIN32(error_code); |
| 35 } | 35 } |
| 36 | 36 |
| 37 string16 GetPortMonitorDllName() { | 37 string16 GetPortMonitorDllName() { |
| 38 if (IsSystem64Bit()) { | 38 if (IsSystem64Bit()) { |
| 39 return string16(L"gcp_portmon64.dll"); | 39 return string16(L"gcp_portmon64.dll"); |
| 40 } else { | 40 } else { |
| 41 return string16(L"gcp_portmon32.dll"); | 41 return string16(L"gcp_portmon.dll"); |
| 42 } | 42 } |
| 43 } | 43 } |
| 44 | 44 |
| 45 HRESULT GetPrinterDriverDir(FilePath* path) { | 45 HRESULT GetPrinterDriverDir(FilePath* path) { |
| 46 BYTE driver_dir_buffer[MAX_PATH * sizeof(wchar_t)]; | 46 BYTE driver_dir_buffer[MAX_PATH * sizeof(wchar_t)]; |
| 47 DWORD needed = 0; | 47 DWORD needed = 0; |
| 48 if (!GetPrinterDriverDirectory(NULL, | 48 if (!GetPrinterDriverDirectory(NULL, |
| 49 NULL, | 49 NULL, |
| 50 1, | 50 1, |
| 51 driver_dir_buffer, | 51 driver_dir_buffer, |
| (...skipping 28 matching lines...) Expand all Loading... |
| 80 &module); | 80 &module); |
| 81 int count = LoadString(module, | 81 int count = LoadString(module, |
| 82 string_id, | 82 string_id, |
| 83 buffer, | 83 buffer, |
| 84 MAX_PATH); | 84 MAX_PATH); |
| 85 CHECK_NE(0, count); | 85 CHECK_NE(0, count); |
| 86 return string16(buffer); | 86 return string16(buffer); |
| 87 } | 87 } |
| 88 } | 88 } |
| 89 | 89 |
| OLD | NEW |