C++ AddIn, Server, Deactivate or OnDeactivate

C++ AddIn, Server, Deactivate or OnDeactivate

oransen
Collaborator Collaborator
481 Views
2 Replies
Message 1 of 3

C++ AddIn, Server, Deactivate or OnDeactivate

oransen
Collaborator
Collaborator

The plugin examples shows the body to

STDMETHODIMP CSimpleAddInServer::Deactivate(void)

(for example). But the new wizard creates a function like this:

 

STDMETHODIMP CCh1AddInAddInServer::OnDeactivate ()

 

Do they serve the same purpose? And so should I only use OnDeactivate?

 

 

0 Likes
482 Views
2 Replies
Replies (2)
Message 2 of 3

xiaodong_liang
Autodesk Support
Autodesk Support

Hi,

 

As I remember, this is just because which type of interface is selected when creating the addin (see attached fig).

 

if Use IDispatch interfac,  it is OnDeactivate (). otherwise, Deactivate. the similar to activate method.

Message 3 of 3

oransen
Collaborator
Collaborator

Yes, one was from an old plugin example and one from a wizard generated project.

 

0 Likes