Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

CoMarshalInterThreadInterfaceInStream and WinXP

CoMarshalInterThreadInterfaceInStream and WinXP

CoMarshalInterThreadInterfaceInStream and WinXP

We have created a multi-threaded application which works without any problems on a NT-4.0 Workstation.

When I try to run the same application in Windows XP, I get an error in a call to CoMarshalInterThreadInterfaceInStream which returns

This problem can be duplicated with different machines running Windows XP.

I have provided a snippet of the code below where the call fails in Windows XP
 IUnknown** pp = p->m_vec.begin();
 while (pp < p->m_vec.end() && hr == S_OK)
  if (*pp != NULL)
   ICCMEvent* pICMEvent = (ICCMEvent*)*pp;
   IStream* pIStream;
   HRESULT hr = CoMarshalInterThreadInterfaceInStream(IID_ICCMEvent,
pICMEvent , &pIStream);
   CComPtr<ICCMEvent> pMarshalEvent;
   hr = CoGetInterfaceAndReleaseStream(pIStream, IID_ICCMEvent,

   ATLTRACE("CCM::NewCurrentCassette before call to sink function\n");
   hr = pMarshalEvent->NewCurrentCassette(m_pCurrentCassette, m_setBy);
   ATLTRACE("CCM::NewCurrentCassette after call to sink function, hr=%lx\n",


Environment - Windows-XP,SP-2,Visual Studio 6.0,SP-4,ATL-3.0

Should I be doing anything different in Windows XP?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close