This question already has answers here:
How to detect win32 process creation/termination in c++
(9 answers)
Closed 9 years ago.
I am looking for a WIN 32 API to detect application launch and termination in my application.
I am looking to develop a dockBar/TaskBar for which I need to get handle of application that are launch and terminate.
For a DockBar/TaskBar have a look at the RegisterShellHookWindow function.
Specifically, the HSHELL_WINDOWCREATED and HSHELL_WINDOWDESTROYED notification.
Related
This question already has answers here:
How to programmatically cause a core dump in C/C++
(10 answers)
I want a function in C on linux to collect core dump without terminating the process
(4 answers)
Closed 5 years ago.
I would like to create a core dump in my application on purpose, not only when it gets terminated.
I don't know if this is the right question, but is there any kernel function to call in my program like dump_core("core.XXXX")?
The goal I want to achieve is, to dump my core on some points in my application and later to debug this core dumps with gdb.
This question already has answers here:
How to determine CPU and memory consumption from inside a process
(10 answers)
Closed 7 years ago.
I have a few threads in my program - run on Windows and write in C++.
How can I know in the end of the running how much CPU time is used by all or one of them?
You can use the GetThreadTimes function: https://msdn.microsoft.com/en-us/library/windows/desktop/ms683237%28v=vs.85%29.aspx
This question already has answers here:
How to detect reliably Mac OS X, iOS, Linux, Windows in C preprocessor? [duplicate]
(3 answers)
Closed 8 years ago.
It's been 10 years since I've learned C++ during high school, now I'm playing around it again and I'll already facing some problems regarding multi-platform.
I saw that if I want to display special characters on windows, I should use wprintf. However, on *nix systems, it is not necessary.
So, how can I detect what is the current platform, so I can run printf or wprintf depending on it?
UPDATE
I'll open a new question with the error and close this one.
You could simply use wprintf (or wcout <<) on either platform. See this question for an example.
This question already has answers here:
How do you check the windows version in Win32 at runtime?
(2 answers)
Closed 9 years ago.
I wanted to ask, is there any possibility to determine the Windows version via the application, I have made some research, but haven't found,
Thank you in advance ^^
Err... How about GetVersionEx() ?
This question already has answers here:
Cross-platform crash handler
(3 answers)
Closed 9 years ago.
Are there any cross platform crash reporters for C++ besides google-break pad? I have seen google-breakpad but it has very very limited documentation, and I have nothing seen very much mentioned here, google or other source websites
Have a look at BugTrap which might help you.