OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Leon Finker (lf21NETZERO.NET)
Date: Fri Jun 08 2001 - 17:56:43 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    Hi All,

    It seems that CoMarshalInterThreadInterfaceInStream can be called only
    32,769 times in a row on a pointer
    to some COM object without balanced CoGetInterfaceAndReleaseStream calls.

    I receive a pointer to COM component and I
    CoMarshalInterThreadInterfaceInStream it to process it on another thread
    (involves sending the
    data it contains over a socket). So, I can easily have more
    CoMarshalInterThreadInterfaceInStream calls before they are actiually
    processed.
    Never thought it would have a limit like that.

    The error I get back is 0x8007000E -"Not enough storage is available to
    complete this operation. " But the whole process hardly takes 10 megs and
    the overall
    memory is not even 25% used.

    Imaginary ex.:
      IUnknown* pUnk;
      HRESULT hr = CoCreateInstance(CLSID_Something, 0, CLSCTX_INPROC,
    IID_IUnknown, (void**)&pUnk);
      IStream* pStream;
      int i =0;
      while(true)
      {
       i++;
       hr = CoMarshalInterThreadInterfaceInStream(IID_IUnknown, pUnk, &pStream);
       ATLASSERT(!FAILED(hr));
      }

    It should assert fairly quick and i will always be equal to 32,769

    NetZero Platinum
    No Banner Ads and Unlimited Access
    Sign Up Today - Only $9.95 per month!
    http://www.netzero.net

    ----------------------------------------------------------------
    Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
    contains important info. Save time, search the archives at
    http://discuss.microsoft.com/archives/index.html .
    To unsubscribe, mailto:DCOM-signoff-requestDISCUSS.MICROSOFT.COM