You are here: Programmers Reference > Programmer's Reference > ScanningManager > ChainToUserExit

ScanningManager.ChainToUserExit method

You can create a ScanTools Plus user exit chain in your solution program. This method allows reuse of existing user-exits or to implement functionality not available in ScanTools Plus Link.

These are the salient features of this method:

  1. You can programmatically specify the user exit at run time i. e. you do not hardwire the user exit path in the application definition.
  2. You can choose to run the user exit before the event so that the event handler has visibility to the changes made at the user exit point.
  3. You can choose to run the user exit after the event so that the user exit sees the changes made in the event handler.
  4. You can chain multiple user exits.
  5. You can call your own functions exported out of the user exit DLL.
  6. Stay compatible with a user exit specified in the application definition. This user exit may establish a chain of its own.

Invoke the ChainToUserExit method to add a user exit to the chain. The user exit chain must be set up afresh when you initiate a new scanning session i. e. before a call to Scan. The entire user exit chain is automatically unloaded just before the SessionComplete event. Do not call this method once the scanning session is in progress, for example during or between events.

Install the user exit(s) in the installation folder of your solution program. Always specify the full path to the user exit file including the extension ".DLL".

Valid

See Scanning Manager States and Valid Properties/Methods

See ScanningManager Events and Valid Properties/Methods

IDL

HRESULT ChainToUserExit (

[in] BSTR ExitFile,

[in] VARIANT_BOOL InvokeExitPointsAfterEvent,

[out, retval] LONG* pVal);

Input Parameters

ExitFile

Specify the full path and name of the user exit DLL, including the extension .DLL. If the path portion is absent, the Link ScanTools Runtime directory is searched.

InvokeExitPointsAfterEvent

Identifies when user exit points are called, in relation to event.

True

Exit points on the user exit are called after each event handler has returned

False

ScanTools

Exit points on the user exit occur before each event is fired. This is the equivalent of specifying this user exit in the Plus Application Settings dialog.

Return Value

pVal

Win32 module handle for the DLL. Becomes valid at the SessionInit event and invalid at the SessionComplete event.

Exceptions

User exit chain full

User exit file not found

Permission Denied exception for un-trusted callers

This Method or Property may not be accessed at this time

See also

ScanEventArgs.UserExitHandle property

 

 

See Help on Help for additional information on using this help file.

See Scantron Technical Support for additional information on technical support and training options.

See the ScanTools Suite System Requirements for further details on hardware and software requirements.

ScanTools is a suite of products; the specific information you want may appear in the help for a different module. If you don't find what you're looking for here, try one of the following:

 

Scantron Corporation

Customer Service (forms, products, and services):

1-800-SCANTRON (722-6876)

www.scantron.com

Technical Support:

1-800-445-3141

support@scantron.com

Copyright © 1998-2012 Scantron Corporation. All rights reserved. Use permitted only under license. www.scantron.com. No part of the Help or user guides may be reproduced in any form, or by any means, without express permission from Scantron Corporation.

LINKS TO THIRD PARTY SITES

This help system may contain links to third party websites ("Linked Sites"). The Linked Sites are not under the control of Scantron and Scantron is not responsible for the content of any Linked Site, including without limitation any link contained in a Linked Site or any changes or modifications to a Linked Site. Scantron is not responsible for web casting or any other form of transmission received from any Linked Site. Scantron provides Users with the ability to link the Assessment System to the Linked Sites as a convenience to you, and the inclusion of any link does not imply endorsement by Scantron of the Linked Site or any association with its operators.