隔離儲存區和漫遊

漫遊使用者設定檔為 Microsoft Windows 的功能 (可用於部分更新的 Windows 98 系統、Windows NT、Windows 2000、Windows XP 和 Windows Vista),可讓使用者在網路上設定識別,並且使用識別登入任何網路電腦,以及隨身攜帶所有個人化的設定。 使用隔離儲存區的組件可以指定使用者的隔離儲存區要隨著漫遊使用者設定檔移動。 漫遊可以配合使用依據使用者和組件的隔離,或依據使用者、定義域和組件的隔離。 如果不使用漫遊範圍,存放區將不會漫遊,即使使用了漫遊使用者設定檔。

範例

下列程式碼範例擷取使用者和組件所隔離的漫遊存放區。 存放區可以透過 isoFile 物件來存取。

Dim isoFile As IsolatedStorageFile = _
    IsolatedStorageFile.GetStore(IsolatedStorageScope.User Or _
        IsolatedStorageScope.Assembly Or _
        IsolatedStorageScope.Roaming, Nothing, Nothing)
IsolatedStorageFile isoFile =
    IsolatedStorageFile.GetStore(IsolatedStorageScope.User |
        IsolatedStorageScope.Assembly |
        IsolatedStorageScope.Roaming, null, null);
IsolatedStorageFile^ isoFile =
    IsolatedStorageFile::GetStore(IsolatedStorageScope::User |
        IsolatedStorageScope::Assembly |
        IsolatedStorageScope::Roaming, (Type^)nullptr, (Type^)nullptr);

定義域範圍可被加入以建立使用者、定義域和應用程式所隔離的漫遊存放區。 下列程式碼範例示範這項功能。

Dim isoFile As IsolatedStorageFile = _
    IsolatedStorageFile.GetStore(IsolatedStorageScope.User Or _
        IsolatedStorageScope.Assembly Or IsolatedStorageScope.Domain Or _
        IsolatedStorageScope.Roaming, Nothing, Nothing)
IsolatedStorageFile isoFile =
    IsolatedStorageFile.GetStore(IsolatedStorageScope.User |
        IsolatedStorageScope.Assembly | IsolatedStorageScope.Domain |
        IsolatedStorageScope.Roaming, null, null);
IsolatedStorageFile^ isoFile =
    IsolatedStorageFile::GetStore(IsolatedStorageScope::User |
        IsolatedStorageScope::Assembly | IsolatedStorageScope::Domain |
        IsolatedStorageScope::Roaming, (Type^)nullptr, (Type^)nullptr);

請參閱

概念

隔離儲存區

隔離的類型

依據使用者和組件的隔離

依據使用者、定義域和組件的隔離