IVsSccProject2.GetSccFiles(UInt32, CALPOLESTR[], CADWORD[]) 方法

定義

呼叫這個方法,以判斷哪些檔案應放置在此階層內指定之 VSITEMID 的原始檔控制之下。This method is called to determine which files should be placed under source control for a given VSITEMID within this hierarchy.

public:
 int GetSccFiles(System::UInt32 itemid, cli::array <Microsoft::VisualStudio::OLE::Interop::CALPOLESTR> ^ pCaStringsOut, cli::array <Microsoft::VisualStudio::OLE::Interop::CADWORD> ^ pCaFlagsOut);
int GetSccFiles(unsigned int itemid, std::Array <Microsoft::VisualStudio::OLE::Interop::CALPOLESTR> const & pCaStringsOut, std::Array <Microsoft::VisualStudio::OLE::Interop::CADWORD> const & pCaFlagsOut);
public int GetSccFiles (uint itemid, Microsoft.VisualStudio.OLE.Interop.CALPOLESTR[] pCaStringsOut, Microsoft.VisualStudio.OLE.Interop.CADWORD[] pCaFlagsOut);
abstract member GetSccFiles : uint32 * Microsoft.VisualStudio.OLE.Interop.CALPOLESTR[] * Microsoft.VisualStudio.OLE.Interop.CADWORD[] -> int
Public Function GetSccFiles (itemid As UInteger, pCaStringsOut As CALPOLESTR(), pCaFlagsOut As CADWORD()) As Integer

參數

itemid
UInt32

在要查詢之的識別碼 VSITEMID[in] Identifier for the VSITEMID being queried.

pCaStringsOut
CALPOLESTR[]

擴展字串陣列的指標, CALPOLESTR 其中包含這個專案的檔案名。[out] Pointer to an array of CALPOLESTR strings containing the file names for this item.

pCaFlagsOut
CADWORD[]

擴展 CADWORD 儲存在中之旗標陣列的指標 DWORD ,表示某些檔案具有特殊行為。[out] Pointer to a CADWORD array of flags stored in DWORDs indicating that some of the files have special behaviors.

傳回

Int32

如果方法成功,它會傳回 S_OKIf the method succeeds, it returns S_OK. 如果失敗,則會傳回錯誤碼。如果專案傳回 E_NOTIMPLGetMkDocument(UInt32, String) 則會呼叫以探索與節點相關聯的檔案。If it fails, it returns an error code.If a project returns E_NOTIMPL, GetMkDocument(UInt32, String) will be called to discover the file associated with the node. 如果專案的每個節點都參考單一檔案,而且沒有特殊檔案,則專案可以安全地返回 E_NOTIMPLIf each of a project's nodes refers to a single file, and there are no special files, then a project can safely always return E_NOTIMPL.

備註

COM 簽章COM Signature

從 ivssccproject2 .idlFrom ivssccproject2.idl

HRESULT GetSccFiles(  
   [in] VSITEMID itemid,  
   [out] CALPOLESTR *pCaStringsOut,  
   [out] CADWORD *pCaFlagsOut  
);  

如果您使用 GetMkDocument ,則會假設旗標為零。If you use GetMkDocument, the flags are assumed to be zero. 如果 pCaFlagsOut -> cElems 有零個元素,則會假設旗標為零。If pCaFlagsOut->cElems has zero elements, the flags are assumed to be zero. 如果您在原始檔控制下沒有任何檔案,則應該傳回零個檔案,因為 GetSccFiles 沒有任何其他用途。If you do not have any files under source control, zero files should be returned because GetSccFiles serves no other purpose.

如果 SFF_HasSpecialFiles 已針對任何與節點相關聯的檔案設定旗標,則 GetSccSpecialFiles 會針對這些檔案呼叫。If the flag SFF_HasSpecialFiles is set for any of the files associated with the node, GetSccSpecialFiles will be called for those files.

來源檔案旗標 (SFF) 有兩個設定:The source file flags (SFF) have two settings:

  • SFF_NoFlags = 0 指出沒有與節點相關聯的特殊檔案。SFF_NoFlags = 0 indicates that there are no special files associated with the node.

  • SFF_HasSpecialFiles = 1 (或非零) 表示有與節點相關聯的特殊檔案。SFF_HasSpecialFiles = 1 (or nonzero) indicates that there are special files associated with the node.

特殊檔案是隱藏的檔案,這些檔案是在 [ 方案瀏覽器 ] 和 [ 簽入 ] 和 [ 簽出 ] 對話方塊中顯示的一般檔案。Special files are hidden files that underlie the normal files visible in Solution Explorer and in the Check In and Check Out dialog boxes.

適用於