Re: Automation Problem...
Did you find an answer to this yet? My problem is not quite the same, but
might be related. When CreateObject (or New) is applied to the MFC application
object, MFC's AfxWinMain()hangs because the message loop (pThread->Run()) never
returns control to the calling thread until the application finishes.
I don't know how to fix this so I'm asking around. For your problem, you
may want to check the:
if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
line in InitInstance(). This returns right away if running automation and
will not let the app initialize the frame window.
-- Rolando
[email protected]
Re: Automation Problem...
Thanks for your hint. I send a message to view for calling OnInitialUpdate() when I start the Automation. It works. But I am going to try your approach. When I start the Automation server from a client, TRACE() in the server does not display. Do you know how I can get debug message?
Re: Automation Problem...
I need much more information about your problem to help you. The best way is to send me a simple sample of your server and client, because everything else is ghosthunting.
Mike
Re: Automation Problem...
Interesting. I have a related problem : I have a dialog based automation
client and a server. The client calls CreateDispatch() to automatically
launch the server. But if I start a fresh copy of my client, a new
instance of the server program is launched. But I want a single instance
of the server to connect to all the clients. How can I do it ?
With thanks,
- Rajaraman
Re: Automation Problem...
Make your server a singleton
Re: Automation Problem...
You should place the /Automation in the command line (use the projects
setting)
start debug the server from VC IDE(PRESS GO\F5)
Once the server had launch with the "Automation" in the command
line it will not display the main window(see initinstance)
it just "publish" it's class factories,so client can create
COM object's
than move to the client and run it.
tomer