1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/crashreporter/LoadLibraryRemote.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,24 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#ifndef LoadLibraryRemote_h 1.9 +#define LoadLibraryRemote_h 1.10 + 1.11 +#include <windows.h> 1.12 + 1.13 +/** 1.14 + * Inject a library into a remote process. This injection has the following 1.15 + * restrictions: 1.16 + * 1.17 + * - The DLL being injected must only depend on kernel32 and user32. 1.18 + * - The entry point of the DLL is not run. If the DLL uses the CRT, it is 1.19 + * the responsibility of the caller to make sure that _CRT_INIT is called. 1.20 + * - There is no support for unloading a library once it has been loaded. 1.21 + * - The symbol must be a named symbol and not an ordinal. 1.22 + */ 1.23 +void* LoadRemoteLibraryAndGetAddress(HANDLE hRemoteProcess, 1.24 + const WCHAR* library, 1.25 + const char* symbol); 1.26 + 1.27 +#endif // LoadLibraryRemote_h