To resolve this problem, manually call the
AddRef() method after loading the client site by calling the
COleControl::GetClientSite method.
The following is an example.
LPOLECLIENTSITE pIClientSite = GetClientSite() ;
If (pIClientSite)
{
pIClientSite->AddRef();
//use client site
pIClientSite->Release() ;
}
Note This solution applies only to MFC-based ActiveX controls.
If the problem is not resolved, visit the following Microsoft Customer Support Services Web site to find other solutions:
The Microsoft Customer Support Services Web site provides the following additional resources:
Searchable Knowledge Base: Search technical support information and self-help tools for Microsoft products.
Solution Centers: View product-specific frequently asked questions and support highlights.
Microsoft Customer Support Newsgroups: Contact counterparts, peers, and Microsoft Most Valuable Professionals (MVPs).
Other Support Options: Use the Web to ask a question, contact Microsoft Customer Support Services, or provide feedback.