共用方式為


ISymUnmanagedBinder::GetReaderForFile 方法

指定中繼資料介面和檔案名時,會傳回正確的 ISymUnmanagedReader 介面,以讀取與模組相關聯的偵錯符號。

這個方法只會在可執行檔旁邊開啟程式資料庫 (PDB) 檔案。 這項變更已針對安全性用途進行。 如果您需要更廣泛的 PDB 檔案搜尋,請使用 ISymUnmanagedBinder2::GetReaderForFile2 方法。

語法

HRESULT GetReaderForFile(  
    [in]  IUnknown     *importer,  
    [in]  const WCHAR  *fileName,  
    [in]  const WCHAR  *searchPath,  
    [out, retval] ISymUnmanagedReader  **pRetVal);  

參數

importer
[in]中繼資料匯入介面的指標。

fileName
[in]檔案名的指標。

searchPath
[in]搜尋路徑的指標。

pRetVal
[out]設定為傳回 之 ISymUnmanagedReader 介面的指標。

傳回值

如果方法成功,S_OK;否則,E_FAIL或其他錯誤碼。

規格需求

頭: CorSym.idl、CorSym.h

另請參閱