PRB: Automation Error (-2147417843) When You Use the Taskbar Notification Area (190523)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q190523 SYMPTOMS
When you use the Shell_NotifyIcon function or the SysTray control sample from the
Visual Basic CD-ROM, you may receive the following error message:
Run-time error: -2147417843 (8001010d)
Automation Error
CAUSE
The run-time error occurs because you are trying to make an Automation call
to an out-of-process (ActiveX) EXE from within the event notification of
the Taskbar Notification Area callback. The value -2147417843 translates to the following
error message:
An outgoing call cannot be made since the application is dispatching
an input-synchronous call.
Automation clients are required by COM to process input-synchronous calls
without interruption, and therefore are prevented from making outgoing
Automation calls while processing such messages.
RESOLUTION
Avoid making outgoing Automation calls during the Taskbar Notification Area callback. If an Automation method needs to be called in response to a user event involving the Taskbar Notification Area, use a simple Timer to post yourself a message, and then let the callback function complete. When the Timer event fires, you can safely call your Automation method.
STATUS
This behavior is by design.
REFERENCESFor additional information about input-synchronous calls in COM and this Automation error, click the article number below
to view the article in the Microsoft Knowledge Base:
131056 PRB: Synch OLE Call Fails in Inter-Process/Thread SendMessage
For additional information, please see the following article in the
Microsoft Knowledge Base: 176085 HOWTO: Use the Taskbar Notification Area Directly from Visual Basic 5.0
Modification Type: | Major | Last Reviewed: | 5/12/2003 |
---|
Keywords: | kbAutomation kbprb kbProgramming KB190523 kbAudDeveloper |
---|
|