Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
SignEventObject interface
Collapse the table of content
Expand the table of content

SignEventObject interface

An event object that is used during the OnSign event.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

<GuidAttribute("096cd71d-0786-11d1-95fa-0080c78ee3bb")> _
Public Interface SignEventObject _
	Inherits SignEvent, DocReturnEvent, DocEvent
Dim instance As SignEventObject

This type is a wrapper for a coclass that is required by managed code for COM interoperability. Use this type to access the members of the COM interface implemented by this coclass. For information about the COM interface, including a link to descriptions of its members, seeSignEvent.

Use the SignedDataBlock property of the SignedDataBlockObject object to determine which set of data, which can be signed, is triggering the OnSign event. The OnSign event can be customized for a fully trusted form template only.

In the following example, the SignEvent object is used to add a signature and timestamp to a SignedDataBlockObject object:

public void OnSign(SignEvent e)
    Signature signature = e.SignedDataBlock.Signatures.Create();
    // Countersign the signature with a trusted timestamp.
    // Get the XML node storing the signature block.
    IXMLDOMNode oNodeSig = signature.SignatureBlockXmlNode;
    IXMLDOMNode oNodeSigValue = oNodeSig.selectSingleNode(".//*[local-name(.)=’signatureValue’]");
    // Get time stamp from timestamp service (fictitious).
    MyTrustedTimeStampingService s = new MyTrustedTimeStampingService();
    string strVerifiedTimeStamp = s.AddTimeStamp(oNodeSigValue.text);
    //Add the value returned from the timestamping service to the 
    //unsigned part of the signature block.
    IXMLDOMNode oNodeObj = oNodeSig.selectSingleNode(".//*[local-name(.)=’Object’]");
    IXMLDOMNode oNode = oNodeObj.cloneNode(false);
    oNode.text = strVerifiedTimeStamp;
    e.ReturnStatus = true;
© 2015 Microsoft