I created an ActiveX using eVC40 - with ATL. Implemented IObjectSafety for safe scripting and initialization. The control is copied & registered on the device fine. I followed the "Creating ActiveX for PIE" in PPC 2003 SDK instructions to access it using ActiveXObject method of JScript.

The test method I invoke returns a string. I put that string in a JScript alert. But when I execute it nothing happens.

Just to make sure there was nothing wrong with either the JScript or the ActiveX method implementation I ported the active code to an Visual Studio 7 project and created a regular ActiveX. And I can execute the ActiveX method fine using the same JScript on my desktop in IE.

Here is the JScript code and the impl of the ActiveX method:

<SCRIPT LANGUAGE="JScript"
function GreetMe(

window.alert("About to invoke greet")
var TestObj = new ActiveXObject("TestOcx.TestObj")
var greeting = TestObj.GreetMe()
window.alert(greeting)

</SCRIPT><FORM><INPUT TYPE="BUTTON" VALUE="Greeting" onclick="GreetMe()"></FORM

STDMETHODIMP CTestObj::GreetMe(BSTR *pbstrGreeting

AFX_MANAGE_STATE(AfxGetStaticModuleState()

// TODO: Add your implementation code her

CString cstrGreeting("Hello")

*pbstrGreeting = cstrGreeting.AllocSysString()

return S_OK


when I click the "Greeting" button on the page I see the first alert before invoking the method but after that nothing happens. It does'nt even give out any error message. What gives?

TIA as usual.
-Jayant