ACAPI_Element_GetLinkedProperties
요소 또는 요소 기본값에 링크된 프로퍼티 객체들을 가져옵니다.
GSErrCode ACAPI_Element_GetLinkedProperties ( const API_Elem_Head* head, bool* criteria, Int32* inviduallyLibInd, Int32** critLibInds, Int32* nCrits );
파라미터
- head
- [in] 요소의 헤더입니다. (
guid
필드만 사용함)guid
가APINULLGuid
일 때, 기본 요소에 링크된 프로퍼티들을 가져옵니다. - criteria
- [out] 기준별 매칭 프로퍼티들이 요소에 링크되는지 여부를 결정합니다
- inviduallyLibInd
- [out] 개별적으로 할당된 프로퍼티의 라이브러리 인덱스입니다. (값 0은 개별적으로 할당된 프로퍼티가 없음을 의미함)
- critLibInds
- [out] 기준에 일치하는 링크된 프로퍼티들의 라이브러리 인덱스들의 배열입니다.
- nCrits
- [out] 기준에 일치하는 링크된 프로퍼티들의 개수입니다.
리턴 값
NoError
- 함수가 성공적으로 완료되었습니다.
APIERR_BADPARS
head
가NULL
입니다.APIERR_BADID
- 올바르지 않은
head
를 지정했습니다. APIERR_MEMFULL
- 프로퍼티들을 가져오기에는 메모리가 부족합니다.
설명
이 함수는 링크된 요소에 대한 프로퍼티 객체들의 리스트를 가져오는 데 사용합니다. 프로퍼티들은 기준 그리고/또는 개별 직접 할당에 의해 건설 요소들과 연관될 수 있습니다. (최대 1개의 개별 할당이 요소에 적용될 수 있음) 이것은 모든 타입의 건설 요소들에게 적용됩니다. 만약 아무 요소도 지정하지 않으면(guid가 APINULLGuid), 주어진 요소 타입의 기본 설정값들을 가져옵니다.
head
를 제외한 어떤 인자라도 NULL
이 될 수 있습니다.
이 경우 함수는 파라미터들의 나머지만 가져옵니다.
더 이상 필요하지 않으면 critLibInds
배열을 해제하는 것을 기억하십시오.
예제
void GetLinkedProperties (const API_Guid& guid) { API_Element element; BNZeroMemory (&element, sizeof (API_Element)); element.header.guid = guid; err = ACAPI_Element_Get (&element); if (err == NoError) { bool byCrit; Int32 indivLibInd; Int32 nCrits; Int32 *critLibInds; if (ACAPI_Element_GetLinkedProperties (&element.header, &byCrit, &indivLibInd, &critLibInds, &nCrits) == NoError) { if (indivLibInd != 0) { DBPrintf ("Library index of individually linked property is %d.\n", indivLibInd); } if (byCrit) { DBPrintf ("Library indices of linked properties matching criteria are [ "); for (Int32 i = 0; i < nCrits; ++i) { DBPrintf ("%d ", critLibInds[i]); } DBPrintf ("].\n"); } BMKillPtr ((GSPtr *) &critLibInds); // critLibInds를 폐기 } } }
ACAPI_Element_SetLinkedProperties 함수의 예제도 보십시오.
요구사항
- 버전: API 6.1 또는 이후
- 헤더: ACAPinc.h
참고사항
API_Elem_Head
ACAPI_Element_SetLinkedProperties
ACAPI_Element_GetProperties
요소 관리자
API 함수