Advertisement Jump to content


This topic is now archived and is closed to further replies.


OLE Automation question - Keep server running

This topic is 5395 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve got an application I''m writing that uses Automation to open Excel and put some data into a workbook. I''d like Excel to remain open even after my application is closed. The way I''m doing it now, I don''t call Excel''s Quit method (but do release the IDispatch interface) and call:
    if(FAILED(OleLockRunning(dispatch, TRUE, FALSE))) {
        warning("Could not lock Excel to running state...");
        MessageBox(g_hWndParent, "Click when done with Excel", "Waiting...", MB_OK);
Is that correct? It seems to work without leaving any traces of Excel running when Excel is closed, and I am releasing the interface. I''m just not sure if it''s the proper way to do this. Thanks.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!