Home » Category » DLL & COM & ActiveX

DLL & COM & ActiveX: waiting for CreateProcessA to finish loading

104| Fri, 30 Nov 2007 06:14:00 GMT| itay222| Comments (0)
from my com object,
i am:

Dim cmdline As String
cmdline = "C:\Program Files\Microsoft Office\Office\Frontpg.exe"
ret& = CreateProcessA(0&, cmdline$, sa, sa, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, start, proc)

then, using
Set fpApp = CreateObject("FrontPage.Application")
i want to do some operations on the window, like
close document and open another.
the probelm is that sometimes (probably when frontpage
didn't fully initalized) i get two windows of frontpage.

i looked awhile in the msnd,
the problem is that the i need to wait for thre shelled
process to be registered in the Running Object Table (ROT)
(not that i know what it is:))
maybe my solution lies in "WaitForInputIdle" or
some other api's ("GetActiveObject"?)

anyhow, i'm a little lazy, maybe you can give me some
code sample that works?
(startprocess, wait for it to return/initialize (be
registered in thr ROT), then CreateObject on it and do
some simple open document method)

thanks!
itay.

Keywords & Tags: waiting, createprocessa, finish, loading, dll, com, activex

URL: http://programming.itags.org/com-activex/174443/
 
«« Prev - Next »» 0 helpful answers below.

DLL & COM & ActiveX Hot Answers

DLL & COM & ActiveX New questions

DLL & COM & ActiveX Related Categories