![]() |
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
(DataFlex) Extract Files from MIMEExtract files from a MIME message.
Use ChilkatAx-win32.pkg Procedure Test Handle hoMime Boolean iSuccess Variant vSa Handle hoSa Integer i Integer n String sTemp1 Boolean bTemp1 // This example requires the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. Get Create (RefClass(cComChilkatMime)) To hoMime If (Not(IsComObjectCreated(hoMime))) Begin Send CreateComObject of hoMime End // Load a MIME document from a file: // (.mht and .eml files contain MIME). Get ComLoadMimeFile Of hoMime "mst.mht" To iSuccess If (iSuccess = False) Begin Get ComLastErrorText Of hoMime To sTemp1 Showln sTemp1 Procedure_Return End Get ComExtractPartsToFiles Of hoMime "/temp/mimeParts" To vSa If (IsComObject(vSa)) Begin Get Create (RefClass(cComCkStringArray)) To hoSa Set pvComObject Of hoSa To vSa End Get ComLastMethodSuccess Of hoMime To bTemp1 If (bTemp1 = False) Begin Get ComLastErrorText Of hoMime To sTemp1 Showln sTemp1 Procedure_Return End Move 0 To i Get ComCount Of hoSa To n // Display the filepaths of the files created: While (i < n) Get ComGetString Of hoSa i To sTemp1 Showln sTemp1 Move (i + 1) To i Loop Send Destroy of hoSa End_Procedure |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.