I get the following automation error message (translated from German so it
might not be exactly the corresponding English VB6 or WinXP term):
Automation Error: An outgoing call cannot be executed because of the
application passes on an input-synchronized call.
My application A.EXE tries do access a third party COM server (TPCS) like
that: Set TPCS = New TPCS.
This works fine when the code executing this command is called from a button
click within application A.EXE, but it fails when the code is called from
within a subclassing routine. The subclassing is done to receive commands in
A.EXE via SendMessage using WM_COPYDATA from another applicaton B.
More precisely, the subclassing routine only fills a command buffer with the
incoming SendMessage command and invokes a timer, and the buffer content is
interpreted or executed in the next timer event. The SendMessage is
immediately freed up with ReplyMessage after filling up the command buffer
and before invoking the timer.
Subclassing and timer overhead stuff are carefully tested and work fine both
in executable A.EXE as well as in the VB6 IDE, when called from the second
Application B.EXE. Only the instancing as written above fails.
For me it looks like creating the instance of TPCS could not be done due to
it's calling from within the subclassing resp. timer routine. I'm not sure
what 'input-synchronized call' exactly does mean, but I think it's the
sublassing.
Question:
Is that right, is it not possible to create in A.EXE an instance of (already
running) TPCS while the code is running in a subclassed routine or timer
event?
If it IS possible, what else might cause such an error message?
Archived from group: microsoft>public>vb>ole>automation