共用方式為


IDebugCanStopEvent2::GetDocumentContext

取得描述這個事件的位置的文件內容。

HRESULT GetDocumentContext ( 
   IDebugDocumentContext2** ppDocCxt
);
int GetDocumentContext ( 
   out IDebugDocumentContext2 ppDocCxt
);

參數

  • ppDocCxt
    [] out傳回IDebugDocumentContext2介面,代表目前的程式碼所在位置的對應來源檔案文件中的位置。

傳回值

如果成功的話,會傳回S_OK。 否則,會傳回錯誤碼。

備註

一般而言,文件內容可以被視為原始程式檔中的位置。

若要取得程式碼內容,也就是向 [程式碼指示的方向,呼叫IDebugCanStopEvent2::GetCodeContext方法。

請參閱

參考

IDebugCanStopEvent2

IDebugDocumentContext2

IDebugCanStopEvent2::GetCodeContext