[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

RPC_E_CANTCALLOUT_INEXTERNALCALL error in COM

Posted on 2002-06-08
10
Medium Priority
?
1,078 Views
Last Modified: 2013-11-25
I am getting this error when I call my COM server.  Anyone out there have experience with it?  I'll post more details if anyone bites.  
0
Comment
Question by:nke2000
[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
10 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 7064749
0
 

Author Comment

by:nke2000
ID: 7064940
Yes, I saw that.  I derived a class from IMessageFilter and implemented IMF::MessagePending().  All I do in it is return PENDINGMSG_WAITNOPROCESS and things work better.  However, the messages are not getting removed from the queue.  Do you know about this interface, jhance?  More help would be greatly appreciated.  I would like to try to flush the message queue...
0
 
LVL 9

Expert Comment

by:BeyondWu
ID: 7066013
Why not just return FALSE?
Try the following code to remove the message.
while (PeekMessage(&msg, NULL, WM_MESSAGE_REMOVE1, WM_MESSAGE_REMOVE2, PM_REMOVE | PM_NOYIELD));

0
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!

 
LVL 2

Expert Comment

by:vbk_bgm
ID: 7066261
IMessageFilter has to be implemented differently for a client and for a (out-of-proc)server.
If you have a out-of-proc server and you implement IMF then,
RetryRejectedCall and MessagePending should return E_NOTIMPL
For a client,
HandleIncomingCall should return E_NOTIMPL and
MessagePending should return PENDINGMSG_WAITNOPROCESS
0
 

Author Comment

by:nke2000
ID: 7067065
vbk_bqm,
My app is a client and I return PENDINGMSG_WAITNOPROCESS from MessagePending and things clear up.  The documentation for this interface suggests that if you return this value from this function that the message could overflow.  Could that become catastrophic?  Would it be better to flush redundant messages from the queue when it starts to fill up?  
0
 
LVL 2

Expert Comment

by:vbk_bgm
ID: 7067168
Messages are getting queued up since perhaps the remote call is not returning (fast). Are you using the server object thru a proxy and direct pointer? This will need messages to be pumped.
Need some more info:
Client threading model?
Server threading model?

P.S. A sample in Inside COM+ (by Eddon) uses message filter in both client and (out-of-proc) server and it works well.
0
 

Author Comment

by:nke2000
ID: 7071129
vbk_bqm,
I am calling a server (an automation server, at that) through a proxy and direct pointer.  I am using a client threading model.

I don't have a copy of "Inside COM+".  If you're willing to post it, that'd great.  You'll get the points no matter what.

Kevin
0
 

Author Comment

by:nke2000
ID: 7071132
vbk_bqm,
I am calling a server (an automation server, at that) through a proxy and direct pointer.  I am using a client threading model.

I don't have a copy of "Inside COM+".  If you're willing to post it, that'd great.  You'll get the points no matter what.

Kevin
0
 
LVL 2

Accepted Solution

by:
vbk_bgm earned 1200 total points
ID: 7072369
I am assuming you are using an STA server and the client is in a STA. If your client is a console application, then you need a message pump. If your client is MFC application then messages should be pumped. Else, your problem should be solved if you follow the steps in MSDN article link given by jhance.
       The sample in Inside COM+ has client as console application. I can send that to you (give your e-mail ID)
0
 

Author Comment

by:nke2000
ID: 7072875
There already is a message pump since I am implementing MMC.  No need to check out the article.  But thanks so much for your help!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

649 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