ATL COM 에서 함수 인자값[in]char* 사용문제.
안녕하세요
ATL 을 공부하고 있는 학생입니다.
목적은 ASP에서 사용할 서버 컴포넌트 제작이구요
간단하게 ATL 프로젝트를 만들고
ATL Object등록에서 ActiveX Server Component를 등록후 add method를 해서
TestMethod [in]int a, [in] int b, [out,retval] int *c
이렇게 만든후
*c = a + b 이렇게 코딩을 해서 ASP페이지를 간단히 만든후 로드하면 사용이 되더라구요
제 목적상 함수 추가부분에서 char * 즉 문자열이 필요한데요
[in]char *a, [in]char *b, [out, retval]char *out 이렇게 함수를 만들어 주면 함수는 만들어지지만
컴파일을 바로 하면 에러2개와 경고2개가 나타납니다.
ATL에서 문자열은 사용이 안되는것인가요?
에러내용
*********************************************
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h(1827) : error C2259: 'CComObject' : cannot instantiate abstract class due to following members:
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h(1823) : while compiling class-template member function 'long __stdcall ATL::CComCreator >::CreateInstance(void *,const struct _GUID &,vo
id ** )'
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h(1827) : warning C4259: 'long __stdcall ITestCom::test(unsigned char *,unsigned char *,unsigned char *)' : pure virtual function was not defined
c:\vc6.0 project\atl\9월5일 atl기초연습\testobj4\testobj4.h(85) : see declaration of 'test'
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h(1823) : while compiling class-template member function 'long __stdcall ATL::CComCreator >::CreateInstance(void *,const struct _GUID &,vo
id ** )'
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h(1827) : error C2259: 'CComObject' : cannot instantiate abstract class due to following members:
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h(1823) : while compiling class-template member function 'long __stdcall ATL::CComCreator >::CreateInstance(void *,const struct _GUID &,vo
id ** )'
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h(1827) : warning C4259: 'long __stdcall ITestCom::test(unsigned char *,unsigned char *,unsigned char *)' : pure virtual function was not defined
c:\vc6.0 project\atl\9월5일 atl기초연습\testobj4\testobj4.h(85) : see declaration of 'test'
c:\program files\microsoft visual studio\vc98\atl\include\atlcom.h(1823) : while compiling class-template member function 'long __stdcall ATL::CComCreator >::CreateInstance(void *,const struct _GUID &,vo
id ** )'
**********************************
댓글 달기