I am trying to hook up or get some kind of a notification event when
the script engine is executing a certain JScript function.
The script engine is not hosted in IE, but in an independent
application.
The Java script functions are declared in the following way:
component.proto type.XXX = function( ... )
I have an instance of IActiveScript and tried to enumerate all the
available DISPIDs, but could not notice any member name that is similar
to the above function name prototype.
The DISPIDs enumeration code:
------------------------------------------------------
IDispatch *pDispatch = 0;
hr = GetScriptDispat ch(pstrName, &pDispatch);
if (hr == S_OK)
{
IDispatchEx *pDispatchEx;
hr = pDispatch->QueryInterface (IID_IDispatchE x, (void
**)&pDispatchEx );
if (hr == S_OK)
{
pdex = pDispatchEx;
// Assign to pdex
hr = pdex->GetNextDispID( fdexEnumAll, DISPID_STARTENU M, &dispid);
while (hr == NOERROR)
{
hr = pdex->GetMemberName( dispid, &bstrName);
hr = pdex->GetNextDispID( fdexEnumAll, dispid, &dispid);
}
}
}
Is there any way of getting such an event ?
Thanks,
Eran.