sigFile

Declaration

function sigFile(iLeft, iTop, iRight, iBottom: Integer; const sSigSet,   sFileName, sCmdLine: WideString; var sErrorText, sSigResult: WideString; hParentWin: OLE_HANDLE): WordBool; safecall;

Description

This function executes eSignatureOffice with specific parameters and does not return until eSigOffice window is closed.

While eSigOffice window is opened, this function runs windows message handling loop and parent application doesn't get "frozen". Special care should be taken to block unnecessary function of the parent application, for example, to prevent calling sigFile function the second time.

Arguments

iLeft, iTop, iRight, iBottom - bounds for eSignatureOffice main window. If hParentWin is NULL, these parameters should contain coordinates relative to the screen. If hParentWin is not NULL, parameters treated as coordinates inside parent window. eSignatureOffice window will be moved as user moves the parent window, thus occupying specific area over the parent window. Note that (0, 0) point is upper-left corner of window border, not the client area. You can use GetSystemMetrics function with SM_CXFIXEDFRAME, SM_CYFIXEDFRAME and SM_CYCAPTION parameters to get border dimensions;

sSigSet - path to the signature set file (usually having .sss extension) that will be used to sign the document. After eSignatureOffice main window is opened and document is loaded, it switches automatically into signing mode and user will be offered to make signatures as descibed in signature set;

sFileName - path to the file that must be signed;

sCmdLine - additional command-line parameters. It's user's responsibility to pass correctly formatted string.

sErrorText - in case an error occurs during signing, its human-readable description will be returned in this parameter. Currently one of the following values could be returned: 'Unknown error', 'Unable to start eSignatureOffice'.

sSigResult - upon successfull execution, human-readable result string returned here.

hParentWin - handle to a parent window. If this paremeter is not NULL, eSigOffice uses iLeft, iTop, iRight and iBottom values to snap to the window and treats coordinates as parent window-relative. Otherwise coordinates are treated as screen-relative.