Quote:Original post by guyatonI've never written a single line of COM code in my life, so you're better of searching for tutorials ;)
I'm still not fully sure, would you mind a real simple demo?
thanks.
But I can at least illustrate the basic principle with some source.
// Public interface class with only pure virtual functions. This is what the users seesclass ITimer {public: virtual int Query() = 0;};// The actual implementation. This is the hidden class that does all of the workclass TimerImpl : public ITimer {private: int Base;public: TimerImpl() { Base = time(NULL); } int Query() { return time(NULL) - Base; }};// And a create function is also exported since the users need a way of creating the hidden TimerImpl'sITimer *CreateTimer() { return new TimerImpl; }
But what you really need is a tutorial.