共用方式為


IExtenderProviderUnk.CanExtend(String, String, Object) Method

Definition

Returns whether or not the provider can provide an extender for the given object in the specified category.

public:
 bool CanExtend(System::String ^ ExtenderCATID, System::String ^ ExtenderName, System::Object ^ ExtendeeObject);
public:
 bool CanExtend(Platform::String ^ ExtenderCATID, Platform::String ^ ExtenderName, Platform::Object ^ ExtendeeObject);
bool CanExtend(std::wstring const & ExtenderCATID, std::wstring const & ExtenderName, winrt::Windows::Foundation::IInspectable const & ExtendeeObject);
[System.Runtime.InteropServices.DispId(2)]
public bool CanExtend (string ExtenderCATID, string ExtenderName, object ExtendeeObject);
[<System.Runtime.InteropServices.DispId(2)>]
abstract member CanExtend : string * string * obj -> bool
Public Function CanExtend (ExtenderCATID As String, ExtenderName As String, ExtendeeObject As Object) As Boolean

Parameters

ExtenderCATID
String

The CATID for the extender being requested.

ExtenderName
String

The name for the extender being requested.

ExtendeeObject
Object

The extendee object.

Returns

A boolean value indicating true if the provider can provide an extender for the given object in the specified category and name.

Attributes

Remarks

CanExtend returns whether an extender is available for the given CATID and name for the specified Extendee instance. The extender provider may need to inspect the extendee instance to determine whether or not it should provide an Extender for it. For example, an extender provider may be chartered to create an "ATLClass" extender to a class object, but only if Class.Language has a value of "C++." The extender provider is expected to do this kind of check in this CanExtend method.

Note

The extendee object is passed as an IUnknown interface.

Applies to