__int32 STDMETHODCALLTYPE _CorExeMain2(
//
Executable
exit
code.
PBYTE pUnmappedPE,
//
-> memory mapped code
DWORD cUnmappedPE,
//
Size of memory mapped code
__in LPWSTR pImageNameIn,
//
-> Executable Name
__in LPWSTR pLoadersFileName,
//
-> Loaders Name
__in LPWSTR pCmdLine)
//
-> Command Line
{
//
This entry point is used by clix
BOOL bRetVal = 0;
//BEGIN_ENTRYPOINT_VOIDRET
;
//
Before we initialize the EE,
make
sure we've snooped
for
all EE-specific
//
command
line arguments that might guide our startup.
HRESULT result = CorCommandLine::SetArgvW(pCmdLine);
if
(!CacheCommandLine(pCmdLine, CorCommandLine::GetArgvW(NULL))) {
LOG((LF_STARTUP, LL_INFO10,
"Program exiting - CacheCommandLine failed\n"
));
bRetVal = -1;
goto
exit
;
}
if
(SUCCEEDED(result))
[color=red] result = CoInitializeEE(COINITEE_DEFAULT | COINITEE_MAIN);[
/color
]
if
(FAILED(result)) {
VMDumpCOMErrors(result);
SetLatchedExitCode (-1);
goto
exit
;
}
//
This is here to get the ZAPMONITOR working correctly
INSTALL_UNWIND_AND_CONTINUE_HANDLER;
//
Load the executable
[color=red] bRetVal = ExecuteEXE(pImageNameIn);[
/color
]
...
...