SignEventObject Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An event object that is used during the OnSignevent.
public interface class SignEventObject : Microsoft::Office::Interop::InfoPath::SignEvent
[System.Runtime.InteropServices.Guid("096CD71D-0786-11D1-95FA-0080C78EE3BB")]
public interface SignEventObject : Microsoft.Office.Interop.InfoPath.SignEvent
type SignEventObject = interface
interface SignEvent
Public Interface SignEventObject
Implements SignEvent
- Derived
- Attributes
- Implements
Examples
In the following example, the SignEvent object is used to add a signature and timestamp to a SignedDataBlockObject object:
public void OnSign(<span class="label">SignEvent</span> e)
{
Signature signature = e.SignedDataBlock.Signatures.Create();
signature.Sign();
// 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;
oNodeObj.parentNode.appendChild(oNode);
e.ReturnStatus = true;
}
Remarks
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.
Properties
ReturnStatus |
Gets or sets the return status of the OnSign event. (Inherited from SignEvent) |
SignedDataBlock |
Gets the set of data which can be signed that triggered the OnSign event. (Inherited from SignEvent) |
XDocument |
Gets a reference to the XDocument object associated with the OnSign event. (Inherited from SignEvent) |