How to close Error MessageBox generated at the start up of the device from other application using c++?

StackOverflow https://stackoverflow.com/questions/10214766

Question

I have my application say test.exe which starts whenever i boot my mobile device.

I also kept dummy.log file at MyDevice\Windows\startup\ folder so whenevr i restart my device i see that error message box appears for dummy.log file.

I observed in the task manager that shell32 size gets increase whenever i boot my device with the above configuration.

And also observe that the shell32 size gets increase due to test.exe and whenever there is an error messagebox after booting the device.

If i close the error message box then shell32 size gets decreasing and test.exe doesnot create any problem.

Only Shell32 size gets increase in the above circumstances, in other cases it works fine.

I don't know how the error message box is linked with my test.exe application.

I debugged and checked and only option i get in my mind is to close the error message box from my application i.e. test.exe.

Edited Section:-

Could anyone let me know how to check & close the error message box from my application i.e. "test.exe"?

2nd time editing:-

Please also let me know how the error message box could be linked with my application i.e. "test.exe"? Is it anything related to timer? I am not doing anything for the outside windows in my application

Please reply thanks.

Was it helpful?

Solution

I think you can use FindWindow API and then send a WM_CLOSE

for more information read this Stackoverflow question

OTHER TIPS

  1. Get the handler to the proccess using this.
  2. Send a mouse event /keystroke to the relvet area using this
  3. Make the program to run on start-up using this

You can see where to send the message on the screen by using spy++ which is usually included in visual studio.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top