Mac 응용 프로그램에서 Component Manager을 사용하여 설치된 구성 요소의 목록을 가져옵니다 (내 응용 프로그램은 a video player이고 설치 목록 QuickTime 코덱). 나는 내 응용 프로그램 32 비트를 컴파일 할 때 나는 (927 개 구성 요소가 CountComponents에서 돌아와) 예상대로 작동,Cocoa : Component Manager가 64 비트 응용 프로그램의 모든 구성 요소를 찾지 못함
- (void) findComponents
{
ComponentDescription desc;
desc.componentType = 0;
desc.componentSubType = 0;
desc.componentManufacturer = 0;
desc.componentFlags = 0;
desc.componentFlagsMask = 0;
long numComps = CountComponents(&desc);
NSLog(@"found %ld components", numComps);
Component aComponent = 0;
while((aComponent = FindNextComponent(aComponent, &desc))) {
// Do stuff with this component.
}
}
:
는이 같은 코드가 있습니다. 그러나 64 비트 컴파일시 CountComponents는 85 개의 구성 요소 만 반환합니다 (어느 구성 요소도 제가 찾고있는 QuickTime 코덱은 아닙니다).
Component Manager 문서는 CountComponents/FindNextComponent에서 64 비트 문제에 관해서는 아무 말도하지 않습니다. (틀림없이 고대의) Apple DTS sample code upon which this code is based은 64 비트 컴파일시 동일한 문제가 있다는 점에 유의할 가치가 있습니다.
내가 잘못하고있는 아이디어가 있습니까? 수동으로 구성 요소를 찾고 'thng'리소스를 파싱하는 데 의존하고 싶지 않습니다.
EDIT : 64 비트 애플리케이션에서 Component Manager는 64 비트 구성 요소 만 나열 할 수 있습니까? 어쩌면이 기능을 32 비트 공유 라이브러리에 내장하고 내 64 비트 응용 프로그램에서 호출 할 수 있습니까?
"* 64 비트 응용 프로그램에서 Component Manager는 64 비트 구성 요소 만 나열 할 수 있습니까? *"그 동작은 * 예상 *입니다. – justin