Chromium Code Reviews| 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.
|
| +} |