IVsIntellisenseProjectHost.CreateFileCodeModel(String, Object) 方法

定義

抓取指定檔案的程式碼模型。Retrieves the code model for a given file.

public:
 int CreateFileCodeModel(System::String ^ pszFilename, [Runtime::InteropServices::Out] System::Object ^ % ppCodeModel);
int CreateFileCodeModel(std::wstring const & pszFilename, [Runtime::InteropServices::Out] winrt::Windows::Foundation::IInspectable const & & ppCodeModel);
public int CreateFileCodeModel (string pszFilename, out object ppCodeModel);
abstract member CreateFileCodeModel : string * obj -> int
Public Function CreateFileCodeModel (pszFilename As String, ByRef ppCodeModel As Object) As Integer

參數

pszFilename
String

在包含檔案名的字串。[in] String containing the name of the file.

ppCodeModel
Object

擴展 IUnknown 程式碼模型實例的介面指標。[out] Pointer to the IUnknown interface of an instance of the code model.

傳回

Int32

如果方法成功,它會傳回 S_OKIf the method succeeds, it returns S_OK. 如果方法失敗,則會傳回錯誤碼。If it fails, it returns an error code.

備註

Intellisense 專案 (執行 IVsIntellisenseProject 的專案) 呼叫這個方法,以取得指定檔案名的程式碼模型。Intellisense projects (projects implementing IVsIntellisenseProject) call this method to get the code model for a given filename. 通常這個方法會呼叫介面的方法,以抓取程式碼模型 GetFileCodeModel IVsIntellisenseProjectOften this method retrieves the code model by calling the GetFileCodeModel method of the IVsIntellisenseProject interface.

適用於