xyzhu, 照你说的做, 为什么我的代码就不可以呢? 或许错在什么地方
MyEventSubscriber.h
class MyEventSubscriber: public CATBaseUnknown
{
CATDeclareClass;
public:
// Standard constructors and destructors
// -------------------------------------
MyEventSubscriber ();
virtual ~MyEventSubscriber ();
void OnDelete (CATCallbackEvent iPublishedEvent,
void *ipPublishingObject,
CATNotification *ipPublishNotification,
CATSubscriberData iUsefulData,
CATCallback iCallbackId );
// Copy constructor and equal operator
// -----------------------------------
MyEventSubscriber (MyEventSubscriber &);
MyEventSubscriber& operator=(MyEventSubscriber&);
};
void MyEventSubscriber::OnDelete ( CATCallbackEvent iPublishedEvent,
void *ipPublishingObject,
CATNotification *ipPublishNotification,
CATSubscriberData iUsefulData,
CATCallback iCallbackId )
{
cout<<"OK, Delete"<<endl;
}
addin中用的你的代码,CreateCommands 执行正确.
[ 本帖最后由 hick 于 2007-1-26 13:29 编辑 ] |