Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

m_spClientSite hasn't been set in my control

Status
Not open for further replies.

CannonClarke

Programmer
Feb 17, 2006
1
GB
Hi all,

I'm writing an ActiveX control to facilitate print templates in IE on NT, 200 and XP. The system worked fine when I was embedding my control in the page using HTML but that method appears to be breaking https rules. My next move was to change the instatiation of the control to the method below.

var trilogiMobileControl = new ActiveXObject("TrilogiMobileControl.PrintIE.1");

trilogiMobileControl.putTemplate("<%=printTemplateFile%>");
trilogiMobileControl.print();

The method print() requires m_spClientSite as a start point. Unfortunately, it's set to NULL. The following code never passes the if conditional as pClientSite is made NULL when m_spClientSite is copied to it in GetClientSite().

IOleClientSite *pClientSite = NULL;
if (SUCCEEDED(GetClientSite(&pClientSite)) && pClientSite)
{
//Use of pClientSite available.
}

My guess is that I'm not being properly connected to the browser but I'm not sure how to correct that or even if that really is the problem.

Any help would be greatly appreciated.

Thanks

Tom
 
I have the same problem and I have solved it creating the object using the <object> html tag. Its seems that using ActiveXObject the m_spClientSite is NULL.
If you find some explanation, please write here.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top