RealProxy.SupportsInterface(Guid) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Belirtilen kimlikle bir COM arabirimi isteğinde bulunur.
public:
virtual IntPtr SupportsInterface(Guid % iid);
public virtual IntPtr SupportsInterface (ref Guid iid);
abstract member SupportsInterface : Guid -> nativeint
override this.SupportsInterface : Guid -> nativeint
Public Overridable Function SupportsInterface (ByRef iid As Guid) As IntPtr
Parametreler
- iid
- Guid
İstenen arabirime başvuru.
Döndürülenler
nativeint
İstenen arabirimin işaretçisi.
Örnekler
[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;
}
public override IntPtr SupportsInterface(ref 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;
}
<SecurityPermission(SecurityAction.LinkDemand, Flags := SecurityPermissionFlag.Infrastructure)> _
Public Overrides Function SupportsInterface(ByRef myGuid As Guid) As IntPtr
Console.WriteLine("SupportsInterface method called")
' Object reference is requested for communication with unmanaged objects
' in the current process through COM.
Dim myIntPtr As IntPtr = Me.GetCOMIUnknown(False)
' Stores an unmanaged proxy of the object.
Me.SetCOMIUnknown(myIntPtr)
' return COM Runtime Wrapper pointer.
Return myIntPtr
End Function 'SupportsInterface
Açıklamalar
yöntemi, SupportsInterface geçerli proxy örneğinin geçerli örneğin temsili sunucu nesnesi adına ek COM arabirimleri uygulamasına olanak tanır. Geçerli yöntem istenen arabirimi oluşturur ve buna bir işaretçi döndürür. Bu yöntem tarafından oluşturulabilecek COM arabirimlerinin türleri ara sunucu türüne bağlıdır ve bu da geçerli proxy örneğinin temsil ettiği sunucu nesnesinin türüne bağlı olabilir.
Daha fazla bilgi için bkz. ProxyAttribute.
Şunlara uygulanır
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin