-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
badef5c
commit 9847db4
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
|
||
namespace YY | ||
{ | ||
namespace Thunks | ||
{ | ||
|
||
#if (YY_Thunks_Support_Version < NTDDI_WINXP) | ||
|
||
// Available in starting with Windows XP. | ||
// Windows 2000时这个函数就已经存在了,只是从XP开始才从kernel32.dll中导出 | ||
__DEFINE_THUNK( | ||
ntdll, | ||
16, | ||
WORD, | ||
NTAPI, | ||
RtlCaptureStackBackTrace, | ||
_In_ DWORD _uFramesToSkip, | ||
_In_ DWORD _uFramesToCapture, | ||
_Out_writes_to_(_uFramesToCapture, return) PVOID* _pBackTrace, | ||
_Out_opt_ PDWORD _puBackTraceHash | ||
) | ||
{ | ||
if (const auto _pfnRtlCaptureStackBackTrace = try_get_RtlCaptureStackBackTrace()) | ||
{ | ||
return _pfnRtlCaptureStackBackTrace(_uFramesToSkip, _uFramesToCapture, _pBackTrace, _puBackTraceHash); | ||
} | ||
|
||
return 0; | ||
} | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters