|
-
April 9th, 1999, 05:01 PM
#1
Automation Problem...
I start an MFC MDI Automation from a client. However, the CView:: OnInitialUpdate() of the server is not called, thus the program crashes. What is the problem with it? Should I move the initialization to elsewhere? I can’t figure out how to fix it. Any suggestions are greatly appreciated.
-
April 9th, 1999, 08:29 PM
#2
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]
-
April 10th, 1999, 09:13 PM
#3
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?
-
April 12th, 1999, 08:59 AM
#4
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
-
April 13th, 1999, 02:21 AM
#5
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
-
April 20th, 1999, 06:04 PM
#6
Re: Automation Problem...
Make your server a singleton
-
April 21st, 1999, 04:34 AM
#7
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|