PrepareExit()
Declaration
procedure PrepareExit; safecall;
Description
Cancel Sign Info Dialog, Hash Dialog and Signing session as preparation of Document closing and ocx removal. Normally the closing of ocx is not done when sign mode is active.
Use getWorkMode to distinguish between sign mode and other.
Sample
Â
procedure TForm1.ButtonExitClick(Sender: TObject); var OldCursor : TCursor; begin OldCursor := screen.Cursor; screen.Cursor := crHourGlass; if Assigned(StepOverSecSign) then begin try try StepOverSecSign.PrepareExit; StepOverSecSign.terminate( self.Handle ) ; FreeandNil(StepOverSecSign); except // Do Nothing if exception screen.Cursor := OldCursor; end; finally screen.Cursor := OldCursor; end; end; end;