SITELOCK for ActiveX Control - HELP Please

Hey All,

The Main Idea of me doing this is.. I want my ActiveX Control to be domain specific. I found an article for this in the microsoft MSDN site (go to the msdn home page and search for "sitelock".. the second link which says sitelock 1.04 for activeX control is what I am talking about)

There they have source code to do this (sitelock.h). So I created an ActiveX Control and added an ATL control obj to it. There are some simple procedures like implementing the class from Ibojectsafty and so on..to be followed to link the sitelock with out contol. (The procedures are given as comments in sitelock.h)

There is a function InApprovedDomain in the sitelock to be called to check whether the present domain is a vaild one or not. This inturn calls another function GetOurUrl.. where it calls the getSite method of IObjectWithSite interface.

ERROR:: when the prg calls this function at runtime.. I get an Access Violation error

The Exact Error is " Unhandled exception in TSTCON32.EXE (.OCX file name): 0xC0000005: Access Violation"

When I called the Microsoft guys and check whether the code is fine.. they assured that shouldnt be any error with the code... if so.. it wouldnt be in the MSDN website. that to especially with the VC++6.0 codes..

well I am using the VC++ 6.0 IDL.

I am stuck with this point and I dont know where I am making mistake. Please could some one help me out of this ..

Thanks in advance..

Badri




Answer this question

SITELOCK for ActiveX Control - HELP Please

  • KTaylor

    You will need to debug the code.

    Note that this forum is for Visual C++ 2005 only. Please post any follow-up qeustions to either an ActiveX MSDN newsgroup or a Visual C++ MSDN newsgroup.

    Ronald Laeremans
    Visual C++ team


  • SITELOCK for ActiveX Control - HELP Please