Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 1998-05-01
2
Medium Priority
?
2,739 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 300 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

670 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