Cannot Call an ATEasy Program Procedure from a Driver or a System

Knowledge Base Article # Q200006

Read Prior Article Read Next Article
Summary Calling a program procedure from a driver or a system is prohibited by design.
  
Login to rate article
Solution:

Calling a program procedure from a driver or a system is prohibited by design. Drivers or systems should be designed so that they are independent the active program's implementation, which can be changed when the application is running.

Program events, however, can be called by a driver or system using, for example, Program.OnInit().

The following procedure provides a workaround using procedure variable:

1.   Program pass in the procedure to a procedure variable stored in a driver or a system module.
2.   The driver or system can now call the program procedure using the procedure variable.

The following procedure provides a workaround using interrupts:

1.   Program installs an interrupt
2.   When a driver needs to call the program procedure, it sets the interrupt
3.   The program interrupt handler can then call a driver function to retrieve the parameters, or can use driver public variables to pass parameters
Article Date 6/20/2000
Keywords ATEasy, Procedure


Login to rate article

Read Prior Article Read Next Article
>