no_registry匯入屬性
no_registry 會告訴編譯器不要搜尋使用 匯入 #import
的型別程式庫登錄。
語法
#import 類型程式庫 no_registry
參數
type-library
類型程式庫。
備註
如果在 include 目錄中找不到參考的型別程式庫,即使型別程式庫位於登錄中,編譯也會失敗。 no_registry 會傳播至以 隱含方式匯入 auto_search
的其他類型程式庫。
編譯器絕不會搜尋登錄中以檔案名指定的類型程式庫,並直接傳遞至 #import
。
指定 時 auto_search
,會使用 初始 #import
的 no_registry 設定來產生其他 #import
指示詞。 如果初始 #import
指示詞是 no_registry , auto_search
則產生的 #import
也會 no_registry 。
如果您想要匯入交叉參考的型別程式庫,no_registry 很有用。 它會讓編譯器在登錄中尋找較舊的檔案版本。 如果型別程式庫未註冊,no_registry 也很有用。
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應