IFeatureSupport 인터페이스

정의

현재 시스템의 기능 정보를 검색하기 위한 표준 인터페이스를 지정합니다.

public interface class IFeatureSupport
public interface IFeatureSupport
type IFeatureSupport = interface
Public Interface IFeatureSupport
파생

예제

다음 예제에서는 합니다 OSFeature 구현의 IFeatureSupport 에 대 한 쿼리는 LayeredWindows 기능입니다. 버전을 확인 하는 경우 확인 null을 기능이 있는지 여부를 결정 합니다. 결과 텍스트 상자에 표시 됩니다. 이 코드에서는 가정 textBox1 생성 되어 폼에 배치 합니다.

private:
   void LayeredWindows()
   {
      // Gets the version of the layered windows feature.
      Version^ myVersion = OSFeature::Feature->GetVersionPresent(
         OSFeature::LayeredWindows );
      
      // Prints whether the feature is available.
      if ( myVersion != nullptr )
      {
         textBox1->Text = "Layered windows feature is installed.\n";
      }
      else
      {
         textBox1->Text = "Layered windows feature is not installed.\n";
      }

      
      // This is an alternate way to check whether a feature is present.
      if ( OSFeature::Feature->IsPresent( OSFeature::LayeredWindows ) )
      {
         textBox1->Text = String::Concat( textBox1->Text,
            "Again, layered windows feature is installed." );
      }
      else
      {
         textBox1->Text = String::Concat( textBox1->Text,
            "Again, layered windows feature is not installed." );
      }
   }
private void LayeredWindows() {
   // Gets the version of the layered windows feature.
   Version myVersion = OSFeature.Feature.GetVersionPresent(OSFeature.LayeredWindows);

   // Prints whether the feature is available.
   if (myVersion != null)
      textBox1.Text = "Layered windows feature is installed." + '\n';
   else
      textBox1.Text = "Layered windows feature is not installed." + '\n';

   // This is an alternate way to check whether a feature is present.
   if (OSFeature.Feature.IsPresent(OSFeature.LayeredWindows))
      textBox1.Text += "Again, layered windows feature is installed.";
   else
      textBox1.Text += "Again, layered windows feature is not installed.";
}
Private Sub LayeredWindows()
    ' Gets the version of the layered windows feature.
    Dim myVersion As Version = _
       OSFeature.Feature.GetVersionPresent(OSFeature.LayeredWindows)
       
    ' Prints whether the feature is available.
    If (myVersion IsNot Nothing) Then
        textBox1.Text = "Layered windows feature is installed." & _
           ControlChars.CrLf
    Else
        textBox1.Text = "Layered windows feature is not installed." & _
           ControlChars.CrLf
    End If 
    'This is an alternate way to check whether a feature is present.
    If OSFeature.Feature.IsPresent(OSFeature.LayeredWindows) Then
        textBox1.Text &= "Again, layered windows feature is installed."
    Else
        textBox1.Text &= "Again, layered windows feature is not installed."
    End If
End Sub

설명

클래스에서 구현 되는 경우 IFeatureSupport 기능을 시스템에 현재 설치 되어 있는지 여부를 확인 하 고 기능의 버전 번호를 사용할 수 있는 메서드를 제공 합니다. 호출 IsPresent 기능 또는 기능을 특정 버전은 현재 설치 여부를 결정 합니다. 호출 GetVersionPresent 에 설치 된 기능의 버전 번호를 확인 합니다.

참조 된 FeatureSupportOSFeature 이 인터페이스의 구현 위한 클래스입니다.

메서드

GetVersionPresent(Object)

지정된 기능의 버전을 검색합니다.

IsPresent(Object)

지정된 기능의 임의의 버전을 시스템에서 현재 사용할 수 있는지 여부를 확인합니다.

IsPresent(Object, Version)

지정된 기능의 새 버전이나 지정된 버전을 시스템에서 현재 사용할 수 있는지 여부를 확인합니다.

적용 대상

추가 정보