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

Side by Side Diff: recovery/repair_exe/mspexecutableelevator.h

Issue 624713003: Keep only base/extractor.[cc|h]. (Closed) Base URL: https://chromium.googlesource.com/external/omaha.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2007-2009 Google Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 // ========================================================================
15 //
16 // This is the API for verifying and executing an executable under high
17 // integrity using an Msi Patch. This API assumes its needed Msi has already
18 // been installed and its needed Msp is in the same directory as this module.
19 //
20 // This class encapsulates the code for passing information between a process
21 // requesting that an executable be elevated and the custom action DLL
22 // in the patch which actually elevates the executable.
23
24 #ifndef OMAHA_RECOVERY_REPAIR_EXE_MSPEXECUTABLEELEVATOR_H__
25 #define OMAHA_RECOVERY_REPAIR_EXE_MSPEXECUTABLEELEVATOR_H__
26
27 #include <windows.h>
28 #include <tchar.h>
29
30 namespace omaha {
31
32 namespace msp_executable_elevator {
33
34 // The following function should be called by the code requesting that
35 // an executable be elevated:
36
37 // Use an MSI patch to verify and execute an executable. Returns a handle
38 // to the process executed.
39 HRESULT ExecuteGoogleSignedExe(const TCHAR* executable,
40 const TCHAR* arguments,
41 const TCHAR* kProductGuid,
42 const TCHAR* kPatchGuid,
43 const TCHAR* kPatchName,
44 HANDLE* process);
45
46 // The following functions should be called by the code (i.e., the custom action
47 // DLL) that actually elevates the executable:
48
49 // From the command line passed to the MSP, retrieve the parameters that will be
50 // passed to VerifyFileAndExecute.
51 // This function is destructive to the passed command line buffer. The pointers
52 // "executable" and "arguments" will point into the command line buffer.
53 bool ParseMSPCommandLine(TCHAR* command_line,
54 TCHAR** executable,
55 TCHAR** arguments,
56 DWORD* calling_process_id);
57
58 // Records the result of the call to VerifyFileAndExecute.
59 bool SetResultOfExecute(HANDLE process, HRESULT result);
60
61 } // namespace msp_executable_elevator
62
63 } // namespace omaha
64
65 #endif // OMAHA_RECOVERY_REPAIR_EXE_MSPEXECUTABLEELEVATOR_H__
OLDNEW
« no previous file with comments | « recovery/repair_exe/msp/testApplying300Patches.bat ('k') | recovery/repair_exe/mspexecutableelevator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698