Interaction.GetAllSettings(String, String) 메서드

정의

Windows 레지스트리에 있는 애플리케이션 엔트리에서 키 설정 및 해당 값(원래 SaveSetting으로 만든 값)의 목록을 반환합니다. My 기능을 사용하면 GetAllSettings 함수보다 레지스트리 작업의 생산성 및 성능이 향상됩니다. 자세한 내용은 Registry를 참조하세요.

public:
 static cli::array <System::String ^, 2> ^ GetAllSettings(System::String ^ AppName, System::String ^ Section);
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
public static string[,]? GetAllSettings (string AppName, string Section);
public static string[,] GetAllSettings (string AppName, string Section);
[<System.Runtime.Versioning.SupportedOSPlatform("windows")>]
static member GetAllSettings : string * string -> string[,]
static member GetAllSettings : string * string -> string[,]
Public Function GetAllSettings (AppName As String, Section As String) As String(,)

매개 변수

AppName
String

필수 요소. 키 설정이 요청된 애플리케이션이나 프로젝트의 이름을 포함하는 String 식입니다.

Section
String

필수 요소. 키 설정이 요청된 섹션의 이름을 포함하는 String 식입니다. GetAllSettings는 2차원 문자열 배열을 포함하는 개체를 반환합니다. 이 문자열은 지정한 섹션의 모든 키 설정과 이 설정에 해당하는 값을 포함합니다.

반환

String[,]

Windows 레지스트리에 있는 애플리케이션 엔트리에서 키 설정 및 해당 값(원래 SaveSetting으로 만든 값)의 목록입니다.

My 기능을 사용하면 GetAllSettings 함수보다 레지스트리 작업의 생산성 및 성능이 향상됩니다. 자세한 내용은 Registry를 참조하세요.

특성

예외

사용자가 로그인하지 않았습니다.

예제

이 예제에서는 먼저 사용 하 여는 SaveSetting 로 지정 된 애플리케이션에 대해 Windows 레지스트리 항목을 확인 하는 함수 AppName를 사용 하 여는 GetAllSettings 설정을 표시 하려면 함수입니다. 참고 해당 애플리케이션 이름 및 Section 이름을 사용 하 여 검색할 수 없습니다 GetAllSettings합니다. 마지막으로 DeleteSetting 함수 애플리케이션의 항목을 제거 합니다.

' Object to hold 2-dimensional array returned by GetAllSettings.
' Integer to hold counter.
Dim MySettings(,) As String
Dim intSettings As Integer
' Place some settings in the registry.
SaveSetting("MyApp", "Startup", "Top", "75")
SaveSetting("MyApp", "Startup", "Left", "50")
' Retrieve the settings.
MySettings = GetAllSettings("MyApp", "Startup")
For intSettings = LBound(MySettings, 1) To UBound(MySettings, 1)
    WriteLine(1, MySettings(intSettings, 0))
    WriteLine(1, MySettings(intSettings, 1))
Next intSettings
DeleteSetting("MyApp")

설명

GetAllSettings는 또는 Section 가 없는 경우 AppName 초기화 Object 되지 않은 를 반환합니다.

사용자가 대화형으로 GetAllSettings 로그온할 때까지 활성화되지 않는 레지스트리 키에서 HKEY_LOCAL_USER 작동하므로 사용자를 로그온해야 합니다.

비대화형 프로세스(예: Mtx.exe)에서 액세스해야 하는 레지스트리 설정은 또는 HKEY_USER\DEFAULT\Software 레지스트리 키 아래에 HKEY_LOCAL_MACHINE\Software\ 저장되어야 합니다.

적용 대상

추가 정보