locked
why looping through projectitems sometimes causes Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER).... RRS feed

  • Question

  • in my project

    we have a package created in vs2008 sp1 ,

    experimentalhive project created in vs 2008 sdk 1.1...

    so i simply make a console application that generates some file and  then build the experimantelhive project from console...

    while i am looping through the loaded project item to catch the file extension and than cat it to a vslangProject item to run

    customtool option sometime i get this errror...

    i get this error not just while casting a EnvDte.projectItem to vsLangproject item ..

    while checking projectItem Name or it's property

    or just while looping next item in the projectitems...

    have anyone has an idea?

    i searched  a lot ..i tried a workarround than has a class messageFilter or something like than but it did not help...

    additionally i can warkaround from this error

    like this..

      System.Threading.Thread.Sleep(50);
    

    but it sometimes accour...i could not find a solution...

    the error is below...

    The message filter indicated that the application is busy. (Exception from HRESULT: 0x8001010A (RPC_E_SERVERCALL_RETRYLATER))


    evgeni


    Friday, February 17, 2012 10:39 AM

Answers

  • ok guys .... it seems that i solved this issue...

    i was impleneting ImessegaFilter at wrong side...

    and for those who is related for my scenario i just added 

    at top of the  main  function like this...

     [STAThread]
            static void Main(string[] args)

    and it is all now fine..

    thanks ...


    evgeni

    • Marked as answer by evgenixristov Tuesday, February 21, 2012 11:54 AM
    Tuesday, February 21, 2012 11:02 AM

All replies

  • A message filter is the proper way to handle this, you are attempting to make a cross process call via a COM proxy and the target process is not accepting incoming calls at the moment.

    Ryan

    Sunday, February 19, 2012 7:55 PM
  • Hello Ryan,

    i try to impelent messageFilter as described here (http://msdn.microsoft.com/en-us/library/ms228772.aspx )

    ....but it did not help ...

    and even if i set a breakpoint in messageFilter methods it never hits to one of them.

    but when searching about this issue i found that ( http://www.ureader.com/msg/14781025.aspx ) 

    It looks like implementing an IMessageFilter and calling 
    CoRegisterMessageFilter would solve this for STA threads.  But our threads 
    are MTA which are not supported by this API, so how do we instruct COM to 
    retry the call?

    so for this for my scenario i don't know that if my application is a STA or MTA ? 




    evgeni

    Tuesday, February 21, 2012 9:15 AM
  • ok guys .... it seems that i solved this issue...

    i was impleneting ImessegaFilter at wrong side...

    and for those who is related for my scenario i just added 

    at top of the  main  function like this...

     [STAThread]
            static void Main(string[] args)

    and it is all now fine..

    thanks ...


    evgeni

    • Marked as answer by evgenixristov Tuesday, February 21, 2012 11:54 AM
    Tuesday, February 21, 2012 11:02 AM