IFeatureSupport 인터페이스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
현재 시스템에서 기능 정보를 검색하기 위한 표준 인터페이스를 지정합니다.
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 구현은 및 클래스를 참조하세요.
메서드
| Name | Description |
|---|---|
| GetVersionPresent(Object) |
지정된 기능의 버전을 검색합니다. |
| IsPresent(Object, Version) |
지정된 기능의 지정된 버전 또는 최신 버전을 시스템에서 현재 사용할 수 있는지 여부를 확인합니다. |
| IsPresent(Object) |
지정된 기능의 버전을 시스템에서 현재 사용할 수 있는지 여부를 확인합니다. |