IsolatedStorageFile.GetMachineStoreForApplication 方法

定義

取得對應於呼叫程式碼的應用程式識別之機器範圍隔離儲存區。

public:
 static System::IO::IsolatedStorage::IsolatedStorageFile ^ GetMachineStoreForApplication();
public static System.IO.IsolatedStorage.IsolatedStorageFile GetMachineStoreForApplication ();
static member GetMachineStoreForApplication : unit -> System.IO.IsolatedStorage.IsolatedStorageFile
Public Shared Function GetMachineStoreForApplication () As IsolatedStorageFile

傳回

物件,該物件對應至以呼叫程式碼的應用程式識別為基礎的隔離儲存區範圍。

例外狀況

無法判斷呼叫端的應用程式識別。

-或-

無法決定應用程式定義域的授與權限集。

-或-

無法初始化隔離的儲存區位置。

尚未授與足夠的隔離儲存區使用權限。

備註

使用此方法時,與應用程式相關聯的所有元件都會使用相同的隔離存放區。

GetMachineStoreForApplication 在功能上相當於下列程式代碼:

isoFile = IsolatedStorageFile::GetStore(IsolatedStorageScope::Application |
    IsolatedStorageScope::Machine, (Type^)nullptr);
isoFile = IsolatedStorageFile.GetStore(IsolatedStorageScope.Application |
    IsolatedStorageScope.Machine, null);
isoFile = IsolatedStorageFile.GetStore(IsolatedStorageScope.Application Or _
    IsolatedStorageScope.Machine,  Nothing)

適用於

另請參閱