RealProxy::SupportsInterface Method (Guid%)
.NET Framework (current version)
Requests a COM interface with the specified ID.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- iid
-
Type:
System::Guid%
A reference to the requested interface.
The SupportsInterface method allows the current proxy instance to implement additional COM interfaces on behalf of the server object that the current instance represents. The current method generates the requested interface and returns a pointer to it. The types of COM interfaces that can be generated by this method depend on the proxy type, which in turn might depend on the type of the server object that the current proxy instance represents.
For more information, see ProxyAttribute.
[SecurityPermission(SecurityAction::LinkDemand, Flags = SecurityPermissionFlag::Infrastructure)] IntPtr SupportsInterface( Guid * /*myGuid*/ ) { Console::WriteLine( "SupportsInterface method called" ); // Object reference is requested for communication with unmanaged objects // in the current process through COM. IntPtr myIntPtr = this->GetCOMIUnknown( false ); // Stores an unmanaged proxy of the object. this->SetCOMIUnknown( myIntPtr ); // return COM Runtime Wrapper pointer. return myIntPtr; }
.NET Framework
Available since 1.1
Available since 1.1
Show: