المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : DCOM Interop: Generate Custom Managed C++ Wrappers for Easier COM Interoperation Usin



C++ Programming
03-29-2009, 02:42 AM
Now that you're writing managed code, you'll certainly want to use your existing COM components, but you can't simply call them directly. Instead, you have to wrap the COM component in a runtime-callable wrapper that acts as a proxy between the component and your managed code. While the CLR provides wrapper classes for this purpose, there will be times when you'll want custom objects to wrap your COM components. One way to get the low-level access you need to precisely control resource cleanup, pass security information, and get access to CLR features is to write your own wrapper class in managed C++. This article shows you how.

Vishwas Lele

<a href="http://msdn.microsoft.com/magazine/55422219-abe4-4fc0-b99e-5fa9e5f0229c">MSDN Magazine August 2003