CustomQueryInterface Sample - IMarshal on WCF

Rating:        Based on 1 rating
Reviewed:  0 reviews
Downloads: 429
Released: Nov 12, 2009
Updated: Nov 13, 2009 by Yongtai
Dev status: Alpha Help Icon

Recommended Download

Application Custom IMarshal on WCF
application, 142K, uploaded Nov 11, 2009 - 429 downloads

Release Notes

CustomQueryInterface enables users to customize the default implementation of “standard” COM interfaces provided by CLR. We already released a sample to demo customized IDispatch as well as aggregation between two managed objects.

To further demo the power of CustomQueryInterface and the ability to use the .Net technology (WCF) within COM world, this sample targets the customization of IMarshal interface by using WCF.

IMarshal enables a COM object to define and manage the marshaling of its interface pointers. On the other hand, WCF provides serialization facilities that enable loose coupling, which significantly eases the customization of IMarshal and makes it more flexible.

In this sample, we provide three important things:
  • A managed class acts as the COM component which also implements a WCF service.
  • A managed class acts as the COM proxy which contains the WCF client.
  • A program that demos the usage of the two classes above by passing the IUnknown pointer through the global stream.

Please note that you need to open the solution as the administrator on Vista or Windows 7.

Reviews for this release