![]() |
Chilkat • HOME • Android™ • AutoIt • C • C# • C++ • Chilkat2-Python • CkPython • Classic ASP • DataFlex • Delphi DLL • Go • Java • Node.js • Objective-C • PHP Extension • Perl • PowerBuilder • PowerShell • PureBasic • Ruby • SQL Server • Swift • Tcl • Unicode C • Unicode C++ • VB.NET • VBScript • Visual Basic 6.0 • Visual FoxPro • Xojo Plugin
(PowerBuilder) Examine the Contents of a .p7m by Converting to XMLExamines the contents of a .p7m signature by converting it to XML.
integer li_rc oleobject loo_Asn integer li_Success string ls_StrXml oleobject loo_Xml // This example requires the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. loo_Asn = create oleobject // Use "Chilkat_9_5_0.Asn" for versions of Chilkat < 10.0.0 li_rc = loo_Asn.ConnectToNewObject("Chilkat.Asn") if li_rc < 0 then destroy loo_Asn MessageBox("Error","Connecting to COM object failed") return end if li_Success = loo_Asn.LoadBinaryFile("qa_data/p7m/a.p7m") if li_Success <> 1 then Write-Debug loo_Asn.LastErrorText destroy loo_Asn return end if // Convert to XML. ls_StrXml = loo_Asn.AsnToXml() // The XML returned by AsnToXml will be compact. // To get the XML indented in human-readable form, load // into the Chilkat XML object and emit.. loo_Xml = create oleobject // Use "Chilkat_9_5_0.Xml" for versions of Chilkat < 10.0.0 li_rc = loo_Xml.ConnectToNewObject("Chilkat.Xml") loo_Xml.LoadXml(ls_StrXml) Write-Debug loo_Xml.GetXml() loo_Xml.SaveXml("qa_output/a.xml") // ----------------------------------------------------------------------------------------- // Also see Chilkat's online tool to examine a .p7m and generate code to duplicate the .p7m // ----------------------------------------------------------------------------------------- destroy loo_Asn destroy loo_Xml |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.