IModelObject::GetNumberOfParentModels 方法 (dbgmodel.h)
GetNumberOfParentModels 方法會傳回附加至指定物件實例的父模型數目。 父模型會先在父模型鏈結的線性順序中搜尋屬性深度。
語法
HRESULT GetNumberOfParentModels(
ULONG64 *numModels
);
參數
numModels
此處會傳回指定物件的父模型數目。
傳回值
這個方法會傳回 HRESULT,指出成功或失敗。
備註
程式碼範例
ComPtr<IModelObject> spObject; /* get an object */
ULONG64 numModels;
if (SUCCEEDED(spObject->GetNumberOfParentModels(&numModels)))
{
// numModels contains the number of immediate parent models (does not include
// grand-parents and further generations up). If a key is queried on spObject and
// that instance does not have it, the query will be passed in turn to each of the
// 'numModels' models which are attached to spObject.
}
規格需求
需求 | 值 |
---|---|
標頭 | dbgmodel.h |