donho1976

donho1976

  • NA
  • 15
  • 0

How to create a COM using vc++

Jun 8 2004 1:28 AM
Hi.. i am a newbie in using COM tech. I need to create a COM which contain a class as follow class transcodeEngine { //assume the original code stream is in CPRL format, and no precint is used public: transcodeEngine(char* inputfilename); ~transcodeEngine(); void transcodeEngine::transcoding(unsigned char * output, int loc_center_x, int loc_center_y, int size_x, int size_y, int & count, int reduce_resolutions=0, int components=3, int reduce_layers=0); private: unsigned int num_tiles; unsigned int num_components; unsigned int num_layers; unsigned int num_resolutions; unsigned int num_tps_per_tile; private: //help functions void writeInt(unsigned char * s, unsigned int i, int count); void parseTLM(unsigned char * s, int length); void init(); }; i have use a ATL COM Appwizard to create a com. add a new atl object already. i keep getting this error. i need to pass in a parameter to the constructor of the class i created..seems like i cannot instaniate my object. 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 _G UID &,void ** )' really at a loss.. pls help.. let me know if u need any other info. Thks.. regards iceman