none
Exception RRS feed

  • Question

  • i created a add in, i am using fileSystemWatcher, if  the file is changed i am updating my commandbar
    button. but when  i executed
    fileSystemWatcher's  changed event it gives me error :
    {"The message filter indicated that the application is busy. (Exception from
    HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))"}
    How to slove it?
    Thursday, August 3, 2006 10:25 AM

Answers

  • Hi,

    You'll want to be much clearer in future posts about what you are doing if you expect to get help.  I have no real idea what you are doing, what product you are using, or even what language/platform you are coding with/against.

    However, what that error is telling you is that the application you are calling into is not willing to handle the RPC call at the time you are making it.  The best way to solve this problem is to implement IMessageFilter on the client and provide an implementation of RetryRejectedCall which will either attempt to retry the call or if a certain amount of time has passed will display the OLEUIBusy dialog to give the user the option of continuing to wait or cancelling the call.  You will need to register your message filter by calling CoRegisterMessageFilter.  Note that this is not the System.Windows.Forms.IMessageFilter; what I'm talking about is the COM version: http://windowssdk.msdn.microsoft.com/en-us/library/ms693740.aspx.  If you are using managed code, you will need to create your own interop declarations for this interface. 

    Sincerely,

    Geoff Darst

    Microsoft VSTO Team

    Wednesday, August 9, 2006 3:58 PM
    Answerer

All replies

  • Hi,

    You'll want to be much clearer in future posts about what you are doing if you expect to get help.  I have no real idea what you are doing, what product you are using, or even what language/platform you are coding with/against.

    However, what that error is telling you is that the application you are calling into is not willing to handle the RPC call at the time you are making it.  The best way to solve this problem is to implement IMessageFilter on the client and provide an implementation of RetryRejectedCall which will either attempt to retry the call or if a certain amount of time has passed will display the OLEUIBusy dialog to give the user the option of continuing to wait or cancelling the call.  You will need to register your message filter by calling CoRegisterMessageFilter.  Note that this is not the System.Windows.Forms.IMessageFilter; what I'm talking about is the COM version: http://windowssdk.msdn.microsoft.com/en-us/library/ms693740.aspx.  If you are using managed code, you will need to create your own interop declarations for this interface. 

    Sincerely,

    Geoff Darst

    Microsoft VSTO Team

    Wednesday, August 9, 2006 3:58 PM
    Answerer
  • Let us know if we can be of more help. If not I'll close this thread.

    Thanks,

    Ade

    Thursday, August 10, 2006 4:10 PM
  • Geoff,
         I think your explanation is the most helpful one so far.  I am currently working with the Project Object, for Microsoft Project 2007 client.
    (http://msdn.microsoft.com/en-us/library/bb179353.aspx).  I am manipulating Microsoft Project via a console application, partly written in C# and partly written in VB using Visual Studio 2008.


    I also get the following error message:
    The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))

    I assume as you've mentioned before, Microsoft Project cannot handle all the requests coming in from my console application. 

    Here's what I would like to know:
    1) Do you consider my application a COM Client, and Project the COM Server?
    2) I believe I am using managed code since I am developing in .NET.  Can you tell me anything about creating my own interop declarations?
    3) Why is the default message filter not enough?
    4) Are you implying that I register the message filter with the Microsoft Project?  It is still very unclear which class implements, and how registration is done in .NET.

    Thanks,
    Leor
    Friday, December 12, 2008 3:17 AM
  • Andrew Whitechapel recently wrote a blog on IMessageFilter for an office addin.

    hope that helps.

    • Proposed as answer by Leor491 Tuesday, December 16, 2008 10:24 PM
    Friday, December 12, 2008 10:47 AM
  • Hi Leor,

    1) Yes, your application is the COM client, and Project is the COM server.
    2) I'm not sure what you are asking here--what do you mean by "interop declarations"? 
    3) There isn't any default implementation of RetryRejectedCall.
    4) No, you need to implement and register a message filter in your client.  IMessageFilter is a strange interface because it has both client and server methods on it.  You only care about implementing RetryRejectedCall.  You will need to create a class that implements this (you can just throw NotImplementedExceptions for the other methods).  Then you will need to P/Invoke the Win32 CoRegisterMessageFilter function to get it registered.

    Sincerely,

    Geoff Darst
    Microsoft VSTO Team
    • Proposed as answer by Leor491 Friday, December 12, 2008 7:38 PM
    Friday, December 12, 2008 5:43 PM
    Answerer
  • Thanks, this helps alot too.
    Tuesday, December 16, 2008 10:24 PM
  • On a sidenote, I am currently looking at http://blogs.msdn.com/andreww/archive/2008/11/19/implementing-imessagefilter-in-an-office-add-in.aspx.

    My question here is, how do you actually compile this thing and import it into the .NET workspace?

    Whitechappel says:

    "Note that there are 2 IMessageFilter interfaces commonly defined. One is in System.Windows.Forms – you don’t want that one. Instead, you want the one defined in objidl.h, which you’ll need to import like this:

    [StructLayout(LayoutKind.Sequential, Pack = 4)]

    public struct INTERFACEINFO

    {

        [MarshalAs(UnmanagedType.IUnknown)]

       

    ... so on and so forth"



    Does this mean that I compile the .h file above into a DLL from C++, and then use it as and interface?  If so, my .Net environment does not allow me to do this...  Am I at least making any sense?



    Tuesday, December 16, 2008 11:30 PM