nke2000
asked on
RPC_E_CANTCALLOUT_INEXTERNALCALL error in COM
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.
ASKER
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...
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));
Try the following code to remove the message.
while (PeekMessage(&msg, NULL, WM_MESSAGE_REMOVE1, WM_MESSAGE_REMOVE2, PM_REMOVE | PM_NOYIELD));
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
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
ASKER
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?
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?
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.
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.
ASKER
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
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
ASKER
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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!
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q179692