DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 182946 - Last Review: October 7, 2013 - Revision: 2.1

 
This article was previously published under Q182946
This article has been archived. It is offered "as is" and will no longer be updated.

SYMPTOMS

When you try to interrupt a running script thread with IActiveScript::InterruptScriptThread(), you receive one of the following errors:
<Program> caused an invalid page fault in module OLEAUT32.DLL at 0137:65347989
-or-
Access violation in OLEAUT32.DLL

CAUSE

The documentation for the IActiveScript::InterruptScriptThread() method indicates that you should pass the address of an EXCEPINFO structure as the second parameter. However, it fails to mention that this structure must be initialized because InterruptScriptThread will try to use information stored in the EXCEPINFO structure.

RESOLUTION

To correct this problem, do one of the following two things:
  • Pass NULL for the second argument, pexcepinfo, of InterruptScriptThread(). Here's an example:
    pActiveScript->InterruptScriptThread(SCRIPTTHREADID_BASE, NULL, 0);
    						
  • Initialize the EXCEPINFO structure before passing it to InterruptScriptThread(). Here's an example:
    EXCEPINFO ex;
    memset( &ex, 0, sizeof( EXCEPINFO ));
    
    pActiveScript->InterruptScriptThread( SCRIPTTHREADID_BASE, &ex, 0 );
    						

REFERENCES

Microsoft ActiveX 3.01 SDK; search on "ActiveX Scripting"


APPLIES TO
  • Microsoft Visual C++ 5.0 Enterprise Edition
  • Microsoft Visual C++ 5.0 Professional Edition
Keywords: 
kbnosurvey kbarchive kbcode kbdocerr kberrmsg kbprb KB182946
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support