If I write a code that calls COM component from .NET, is it an example of Adapter pattern?
A:
The pinvoke dll generated by Visual studio is already an adapter.
Alex Reitbort
2010-09-01 10:00:10
+2
A:
The Runtime Callable Wrapper (RCW) functionality in .NET is more an application of the Proxy pattern, because the .NET class mirrors the interface of the underlying COM component.
Quote from Sourcemaking:
Adapter provides a different interface to its subject. Proxy provides the same interface.
Related resources:
Enrico Campidoglio
2010-09-01 10:28:55