IVsRunningDocumentTable2.FindAndLockDocumentEx Yöntem (UInt32, String, IVsHierarchy, UInt32, IVsHierarchy, UInt32, IntPtr, UInt32)
Belgenin dosya adını kullanarak RDT içinde belge bulur ve ardından bu belge üzerinde okuma veya düzenleme kilit alır.
Ad Alanı: Microsoft.VisualStudio.Shell.Interop
Derleme: Microsoft.VisualStudio.Shell.Interop.8.0 (Microsoft.VisualStudio.Shell.Interop.8.0.dll içinde)
Sözdizimi
int FindAndLockDocumentEx(
uint grfRDTLockType,
string pszMkDocument,
IVsHierarchy pHierPreferred,
uint itemidPreferred,
out IVsHierarchy ppHierActual,
out uint pitemidActual,
out IntPtr ppunkDocDataActual,
out uint pdwCookie
)
int FindAndLockDocumentEx(
unsigned int grfRDTLockType,
String^ pszMkDocument,
IVsHierarchy^ pHierPreferred,
unsigned int itemidPreferred,
[OutAttribute] IVsHierarchy^% ppHierActual,
[OutAttribute] unsigned int% pitemidActual,
[OutAttribute] IntPtr% ppunkDocDataActual,
[OutAttribute] unsigned int% pdwCookie
)
abstract FindAndLockDocumentEx :
grfRDTLockType:uint32 *
pszMkDocument:string *
pHierPreferred:IVsHierarchy *
itemidPreferred:uint32 *
ppHierActual:IVsHierarchy byref *
pitemidActual:uint32 byref *
ppunkDocDataActual:nativeint byref *
pdwCookie:uint32 byref -> int
Function FindAndLockDocumentEx (
grfRDTLockType As UInteger,
pszMkDocument As String,
pHierPreferred As IVsHierarchy,
itemidPreferred As UInteger,
<OutAttribute> ByRef ppHierActual As IVsHierarchy,
<OutAttribute> ByRef pitemidActual As UInteger,
<OutAttribute> ByRef ppunkDocDataActual As IntPtr,
<OutAttribute> ByRef pdwCookie As UInteger
) As Integer
Parametreler
grfRDTLockType
Type: System.UInt32[in] Bayrak değerleri öğesinden alınır _VSRDTFLAGS numaralandırması.
pszMkDocument
Type: System.String[in] Bulunduğu belge yolu.
pHierPreferred
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy[out, isteğe bağlı] Tercih edilen döndürür IVsHierarchy bulunduğu belge için arabirim.
itemidPreferred
Type: System.UInt32[out, isteğe bağlı] Bulunduğu belge öğesi tanımlayıcıyı döndürür. Bu benzersiz bir tanımlayıcı veya aşağıdaki değerlerden biri olabilir: VSITEMID_NIL, VSITEMID_ROOT, veya VSITEMID_SELECTION.
ppHierActual
Type: Microsoft.VisualStudio.Shell.Interop.IVsHierarchy[out, isteğe bağlı] Gerçek döndürür IVsHierarchy bulunduğu belge için arabirim.
pitemidActual
Type: System.UInt32[out, isteğe bağlı] Bulunduğu belge öğesi tanımlayıcıyı döndürür. Bu benzersiz bir tanımlayıcı veya aşağıdaki değerlerden biri olabilir: VSITEMID_NIL, VSITEMID_ROOT, veya VSITEMID_SELECTION.
ppunkDocDataActual
Type: System.IntPtr[out, isteğe bağlı] Döndürür IUnknown arabirimi.
pdwCookie
Type: System.UInt32[out, isteğe bağlı] Belge için soyut bir değeri döndürür.
Dönüş Değeri
Type: System.Int32
Yöntem başarılı olursa, döndürür S_OK. Başarısız olursa, bir hata kodu döndürür.
Notlar
Bu yöntem benzer FindAndLockDocument ancak ayrıca bir RDT_EditLock istenen ve belge şu anda yalnızca bir RDT_ReadLock ile atanan hiyerarşi/ItemId ile kayıtlı durumda bir belge için tercih edilen hiyerarşi ItemId çifti belirtimi sağlar. Bu durumda FindAndLockDocument E_UNEXPECTED döndürülen. Şu anda kayıtlı değilse bu yöntem çalışan belge tablosunda belge kaydedilmiyor.
COM imza
Vsshell80.idl:
HRESULT FindAndLockDocumentEx(
[in] VSRDTFLAGS grfRDTLockType,
[in] LPCOLESTR pszMkDocument,
[in] IVsHierarchy *pHierPreferred,
[in] VSITEMID itemidPreferred,
[out] IVsHierarchy **ppHierActual,
[out] VSITEMID *pitemidActual,
[out] IUnknown **ppunkDocDataActual,
[out] VSCOOKIE *pdwCookie
);
Ayrıca bkz.
IVsRunningDocumentTable2 Arabirim
Microsoft.VisualStudio.Shell.Interop Ad Alanı
Başa dön