From 84c34ad826cf8180666afddd32c91d74b667193d Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 25 Jun 2018 10:55:07 +0200 Subject: [PATCH] Handle unicode builds. --- client/TracyCallstack.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/TracyCallstack.cpp b/client/TracyCallstack.cpp index 592f8b1c..26211aec 100644 --- a/client/TracyCallstack.cpp +++ b/client/TracyCallstack.cpp @@ -19,7 +19,11 @@ extern "C" t_RtlWalkFrameChain RtlWalkFrameChain = 0; void InitCallstack() { +#ifdef UNICODE + RtlWalkFrameChain = (t_RtlWalkFrameChain)GetProcAddress( GetModuleHandle( L"ntdll.dll" ), "RtlWalkFrameChain" ); +#else RtlWalkFrameChain = (t_RtlWalkFrameChain)GetProcAddress( GetModuleHandle( "ntdll.dll" ), "RtlWalkFrameChain" ); +#endif SymInitialize( GetCurrentProcess(), nullptr, true ); SymSetOptions( SYMOPT_LOAD_LINES ); }