-
Notifications
You must be signed in to change notification settings - Fork 168
Enhance UNICODE support #192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Also to fix GameTechDev#191
Also to fix GameTechDev#191 Signed-off-by: Martin Malik <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank-you for the contribution!
There is one change that is needed (see inline comment). I probably would have gone with wchar_t vs WCHAR, but don't bother changing that now.
I will pull, test, and accept this sometime this week. I can fix that one event then so you don't need to, this is just FYI.
@@ -2218,7 +2215,7 @@ void PMTraceConsumer::HandleProcessEvent(EVENT_RECORD* pEventRecord) | |||
}; | |||
mMetadata.GetEventData(pEventRecord, desc, _countof(desc)); | |||
event.ProcessId = desc[0].GetData<uint32_t>(); | |||
event.ImageFileName = desc[1].GetData<std::string>(); | |||
event.ImageFileName = desc[1].GetData<std::wstring>(); | |||
event.IsStartEvent = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK the underlying data for this event is always char, and GetData() doesn't do any conversion, it just accesses the event data as if it were a T. So, we need to leave it as GetData() and then convert here.
In debug build GetData() should be asserting with this change, though you'll only hit this event when processing from an ETL file (--etl_file).
Thanks for the review. I did all changes requested, hope it's OK now :) |
Also to fix #191