I have MFC application that sometimes pops up a server busy dilaog . This app call a c# dll through com.i found some message in How to prevent the OLE Server Busy dialog box from appearing during a lengthy COM operationthis mean if i don't call AfxOleInit(), then i won't get the server busy dialog.In my app,I call "CoInitialize" to initialize my com environment.but my application also pops up the dialog.Why? I'd like to know why the dialog pops up because sometimes the dialog pops up sometimes it doesn't and how to avoid this dialog box.
Asked
Active
Viewed 863 times
2
-
1`CoInitialize()` initializes COM, but not OLE. What OLE things are you doing in your MFC application? Also you ignored all the other instructions that page gave you, including one that tells you how to turn the dialog off entirely... – andlabs Jun 13 '17 at 03:36
-
What confuses me is that i just initialized COM not OLE,thus there shouldn't be a server busy dialog box.In my app,the main program is provided by third parties and what i developed is invoked as a plug.Does possibly the main program use OLE?or Dose this dialog box only pop up when the app use OLE?Is there a way to know if the app uses OLE? – liu Jun 13 '17 at 04:51
-
The main program is probably using OLE then. You will have to inspect the program's source code to find out if it does use OLE. If you are a plugin, you should probably respect the wishes of the main program with regards to the OLE message filter; I'm not sure what advice Microsoft has on that... – andlabs Jun 13 '17 at 06:33
-
Thank you.now the question is that if the sever busy dialog only pops up when a app uses OLE.I tried to let my COM sever method takes a long time to return back,but the box didn't pop up.it fustrated me very much. – liu Jun 13 '17 at 08:55
-
I presume this is because OLE is supposed to be user-driven, so the box is there to tell the user that the other program is busy right now. I'm not fully sure, though... – andlabs Jun 13 '17 at 15:39
-
1The link is no longer valid. – Andrew Truckle Jun 16 '19 at 18:10
-
Related: https://stackoverflow.com/questions/282091/set-ole-request-timeout-from-c – Thomas Weller Jan 20 '23 at 13:29
-
Related: https://stackoverflow.com/questions/9577052/com-server-busy-dialog-on-mfc – Thomas Weller Jan 20 '23 at 13:29