|
안녕하세요. 이강건입니다.
BCB에서 XML을 사용하려고 합니다.
델파이에서처럼 Project메뉴의 Import Type Library를 이용하여 MSXML.DLL을 임포트하는데, 컴파일시 에러가 발생합니다.
자세히 보니, 프로퍼티에서 사용하는 함수가 인자를 받더군요.
즉, 다음과 같이 프로퍼티가 선언되어 있고...
__property Msxml_tlb::IXMLElement2Ptr ={ read=Get_root };
__property long readyState={ read=Get_readyState };
__property BSTR version={ read=Get_version };
__property BSTR doctype={ read=Get_doctype };
해당 함수가 아래처럼 정의되어 있습니다.
Msxml_tlb::IXMLElement2Ptr __fastcall Get_root(Msxml_tlb::IXMLElement2Ptr* p)
{
return GetDefaultInterface()->get_root(p/*[out,retval]*/);
}
long __fastcall Get_readyState(long* pl/*[out,retval]*/)
{
return GetDefaultInterface()->get_readyState(pl/*[out,retval]*/);
}
그러니까 인자를 받는 함수들이지요.
프로퍼티의 Get메쏘드로 오는 함수가 인자를 가질 수 있습니까?
위를 컴파일할때 나는 에러는 다음과 같습니다.
__property Msxml_tlb::IXMLElement2Ptr ={ read=Get_root };
-> Declaration terminated incorrectly.
__property long readyState={ read=Get_readyState };
__property BSTR version={ read=Get_version };
__property BSTR doctype={ read=Get_doctype };
-> Parameter mismatch in read access specifier of property readyState(...)
그럼 도움을 기다리겠습니다.
이만...
꾸벅~
|