Solved

How to avoid "Illegal to call out while in message filter"

Posted on 1998-05-01
2
2,497 Views
Last Modified: 2012-05-04
I have a VB app calling methods in an object created in an .EXE automation server (written in C++ MFC).  Two different VB forms are accessing two different objects in the same .EXE server.  In general, things work fine, but I seem to get occasional collisions when both VB forms are accessing the server and one reports an automation error 0x8001005 ("Illegal to call out while inside message filter").  The one reporting the error is being wakened by a timer to make periodic calls (which work most of the time).  How is this caused and can it be avoided?
0
Comment
Question by:dho050198
2 Comments
 
LVL 6

Expert Comment

by:anthonyc
ID: 1436500
sounds like a threading problem in the C++
0
 
LVL 2

Accepted Solution

by:
woka earned 100 total points
ID: 1436501
Check out articles Q176399 and Q138063 in the Microsoft knowledge base for some enlightenment about timers and the windows message queue and RPC in out of process servers.  You can use the timer, but you have to set some flags to avoid re-entrancy.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now