|
刚才我查看了一下CaptureDumpFileOnDevice源代码,有了一点进展。
- BOOL CaptureDumpFileOnDevice(DWORD dwProcessId, DWORD dwThreadId, LPCWSTR pwzExtraFilesPath)
- {
- BOOL fHandled = FALSE;
- DWORD dwArguments[5];
- WCHAR wzCanonicalExtraFilesPath[MAX_PATH];
- BOOL fReportFault = (dwProcessId == (-1)) && (dwThreadId == (-1));
- DWORD dwArg2 = 0;
- if (!fReportFault)
- {
- if (pwzExtraFilesPath)
- {
- if (!CeGetCanonicalPathNameW(pwzExtraFilesPath, wzCanonicalExtraFilesPath, ARRAY_SIZE(wzCanonicalExtraFilesPath), 0))
- {
- fHandled = FALSE;
- SetLastError(ERROR_BAD_PATHNAME);
- goto Exit;
- }
- dwArg2 = (DWORD)wzCanonicalExtraFilesPath;
- }
- }
- else
- {
- // For ReportFault this is actually the pointer to the exception
- dwArg2 = (DWORD)pwzExtraFilesPath;
- }
-
- dwArguments[0] = dwProcessId;
- dwArguments[1] = dwThreadId;
- dwArguments[2] = dwArg2;
- // We pass in the CurrentTrust as an extra safety check in DwDmpGen.cpp
- // DwDmpGen.cpp will do additional trust level checking.
- dwArguments[3] = CeGetCurrentTrust();
- dwArguments[4] = (DWORD)&CaptureDumpFileOnDevice;
-
- __try
- {
- // This exception will be handled by OsAxsT0.dll if
- // we succesfully generate a dump file. The RaisException
- // will return if handled, otherwise it will caught by the
- // the try catch block.
- RaiseException(STATUS_CRASH_DUMP,0,5,&dwArguments[0]);
- fHandled = TRUE;
- }
- __except(EXCEPTION_EXECUTE_HANDLER)
- {
- // We end up here if no dump was captured, in which case we return FALSE
- fHandled = FALSE;
- if (ERROR_SUCCESS == GetLastError())
- {
- SetLastError(ERROR_NOT_SUPPORTED);
- }
- }
- Exit:
-
- return fHandled;
- }
复制代码
RaiseException(STATUS_CRASH_DUMP,0,5,&dwArguments[0]);
在这句中代码出现了异常,所以到了except中。
真正的实现代码好像在OsAxsT0.dll中,请问这个库的代码在哪里呀? |
|