Share via


隔離儲存區和漫遊

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

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

Dim isoStore As IsolatedStorageFile
isoStore = IsolatedStorageFile.GetStore(IsolatedStorageScope.User Or IsolatedStorageScope.Assembly Or IsolatedStorageScope.Roaming, Nothing, Nothing)
IsolatedStorageFile isoFile = IsolatedStorageFile.GetStore(IsolatedStorageScope.User | IsolatedStorageScope.Assembly | IsolatedStorageScope.Roaming, null, null);

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

Dim isoStore As IsolatedStorageFile
isoStore = 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);

請參閱

概念

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

其他資源

執行隔離儲存區工作