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

Unified Diff: cloud_print/virtual_driver/win/virtual_driver_helpers.cc

Issue 2590433003: Re-enable building both 32 and 64 bit version of the GCP port monitor. (Closed)
Patch Set: Fix some issues with 32/64 bit installation. Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cloud_print/virtual_driver/win/virtual_driver_helpers.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cloud_print/virtual_driver/win/virtual_driver_helpers.cc
diff --git a/cloud_print/virtual_driver/win/virtual_driver_helpers.cc b/cloud_print/virtual_driver/win/virtual_driver_helpers.cc
index 603447cf11285a636d3ae521c61602d14564337b..e7e7e9f21c721b47e84efff516ce1ef6e424d2cc 100644
--- a/cloud_print/virtual_driver/win/virtual_driver_helpers.cc
+++ b/cloud_print/virtual_driver/win/virtual_driver_helpers.cc
@@ -21,6 +21,14 @@ void DisplayWindowsMessage(HWND hwnd,
::MessageBox(hwnd, GetErrorMessage(hr).c_str(), caption.c_str(), MB_OK);
}
+base::string16 GetPortMonitorDllName() {
+ if (IsSystem64Bit()) {
+ return base::string16(L"gcp_portmon64.dll");
+ } else {
+ return base::string16(L"gcp_portmon.dll");
+ }
+}
+
HRESULT GetPrinterDriverDir(base::FilePath* path) {
BYTE driver_dir_buffer[MAX_PATH * sizeof(wchar_t)];
DWORD needed = 0;
@@ -36,4 +44,11 @@ HRESULT GetPrinterDriverDir(base::FilePath* path) {
*path = path->Append(L"3");
return S_OK;
}
+
+bool IsSystem64Bit() {
+ base::win::OSInfo::WindowsArchitecture arch =
+ base::win::OSInfo::GetInstance()->architecture();
+ return (arch == base::win::OSInfo::X64_ARCHITECTURE) ||
+ (arch == base::win::OSInfo::IA64_ARCHITECTURE);
}
+} // namespace cloud_print
« no previous file with comments | « cloud_print/virtual_driver/win/virtual_driver_helpers.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698