-
Notifications
You must be signed in to change notification settings - Fork 201
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
Fix poor detection of a dupe instance #148
base: main
Are you sure you want to change the base?
Conversation
Old FindWindow() function could mistake an Explorer folder 'UI for ETW' for another instance of 'UI for ETW' (since window title is identical) New custom function registers a unique window message that allows to uniquely identify another instance of 'UI for ETW' Bonus: restore the minimized window of 'UI for ETW' Resolves: google#147
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
It looks basically good but I'll need the cla/google signed before I can accept the patch. |
@googlebot I signed it! |
I get four instances of this error when compiling: 1>C:\src\github\UIforETW\UIforETW\Settings.cpp(17,10): fatal error C1853: 'x64\Release\UIforETW_devrel.pch' precompiled header file is from a different version of the compiler, or the precompiled header is C++ and you are using it from C (or vice versa) I don't mind switching to C++17 but I don't think that global constructors are a great idea. How about: int GetAreYouMeId() { Then it gets constructed on first use instead of before WinMain |
The return type in my sample function should be UINT. |
I noticed this was still open and decided to see why. Part of the reason is that I pasted the wrong error message into my last comment. The actual error message is: 1>C:\src\github\UIforETW\UIforETW\UIforETW.h(46,19): error C7525: inline variables require at least '/std:c++17' (compiling source file Settings.cpp) That message happens on this line: inline const UINT uwmAreYouMe = RegisterWindowMessage(L"678fd291e05741edb987c0a4f5650866"); I continue to think that that isn't a great idea. Inline data is great. Global constructors that run before main are not. |
Old FindWindow() function could mistake an Explorer folder 'UI for ETW'
for another instance of 'UI for ETW' (since window title is identical)
New custom function registers a unique window message that allows to
uniquely identify another instance of 'UI for ETW'
Bonus: restore the minimized window of 'UI for ETW'
Resolves: #147