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

Unified Diff: chrome/split_dll_fake_entry.cc

Issue 15067010: split_link tool, config, and scripts for windows build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/split_dll_fake_entry.cc
diff --git a/chrome/split_dll_fake_entry.cc b/chrome/split_dll_fake_entry.cc
new file mode 100644
index 0000000000000000000000000000000000000000..b5922e58ae858a14a275550afb18a3c8f3ab21ed
--- /dev/null
+++ b/chrome/split_dll_fake_entry.cc
@@ -0,0 +1,30 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <windows.h>
+
+static HINSTANCE g_saved_hinstance;
+static DWORD g_saved_reason;
+static LPVOID g_saved_reserved;
+
cpu_(ooo_6.6-7.5) 2013/05/13 19:29:52 some comment here as well. I might remove the st
scottmg 2013/05/13 20:00:11 Removed & simplified per discussion.
+extern "C" {
+
+BOOL WINAPI ChromeEmptyEntry(HINSTANCE hinstance,
+ DWORD reason,
+ LPVOID reserved) {
+ g_saved_hinstance = hinstance;
+ g_saved_reason = reason;
+ g_saved_reserved = reserved;
+ return 1;
+}
+
cpu_(ooo_6.6-7.5) 2013/05/13 19:29:52 is this function exported?
scottmg 2013/05/13 20:00:11 No, just public in the CRT libs.
+BOOL WINAPI _DllMainCRTStartup(HINSTANCE, DWORD, LPVOID);
+
+__declspec(dllexport) void __stdcall DoDeferredCrtInit() {
+ _DllMainCRTStartup(g_saved_hinstance, g_saved_reason, g_saved_reserved);
+}
+
+int main() {}
+
cpu_(ooo_6.6-7.5) 2013/05/13 19:29:52 why do we need main?
scottmg 2013/05/13 20:00:11 Added comment and __debugbreak.
+}

Powered by Google App Engine
This is Rietveld 408576698