IVsRunningDocTableEvents4.OnBeforeFirstDocumentLock(IVsHierarchy, UInt32, String) Метод

Определение

Вызывается перед первой блокировкой документа в таблице выполняющихся документов (RDT).

public:
 int OnBeforeFirstDocumentLock(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHier, System::UInt32 itemid, System::String ^ pszMkDocument);
public:
 int OnBeforeFirstDocumentLock(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ pHier, unsigned int itemid, Platform::String ^ pszMkDocument);
int OnBeforeFirstDocumentLock(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & pHier, unsigned int itemid, std::wstring const & pszMkDocument);
public int OnBeforeFirstDocumentLock (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy pHier, uint itemid, string pszMkDocument);
abstract member OnBeforeFirstDocumentLock : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * uint32 * string -> int
Public Function OnBeforeFirstDocumentLock (pHier As IVsHierarchy, itemid As UInteger, pszMkDocument As String) As Integer

Параметры

pHier
IVsHierarchy

[in] Объект IVsHierarchy, являющийся владельцем документа, который будет заблокирован.

itemid
UInt32

[in] Идентификатор элемента в иерархии. Это уникальный идентификатор или он может иметь одно из следующих значений: VSITEMID_NIL, VSITEMID_ROOT или VSITEMID_SELECTION.

pszMkDocument
String

[in] Путь к документу, который требуется заблокировать.

Возвращаемое значение

Int32

Если метод завершается успешно, возвращает значение S_OK. В противном случае функция возвращает код ошибки.

Комментарии

Подпись COM

Из vsshell80. IDL:

[C++]

HRESULT IVsRunningDocTableEvents4::OnBeforeFirstDocumentLock(  
   [in] IVsHierarchy* pHier,   
   [in] VSITEMID itemid   
);  

Это событие можно использовать, чтобы убедиться, что документ, который должен быть заблокирован, фактически находится на диске. Например, это событие может дать системе управления версиями возможность загрузить указанный файл из базы данных системы управления версиями, прежде чем он будет заблокирован и открыт.

Применяется к