![]() |
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
(C) Extract Files from MIMEExtract files from a MIME message. Note: This example requires Chilkat v11.0.0 or greater.
#include <C_CkMime.h> #include <C_CkStringTable.h> void ChilkatSample(void) { BOOL success; HCkMime mime; HCkStringTable st; int n; int i; success = FALSE; // This example requires the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. mime = CkMime_Create(); // Load a MIME document from a file: // (.mht and .eml files contain MIME). success = CkMime_LoadMimeFile(mime,"mst.mht"); if (success == FALSE) { printf("%s\n",CkMime_lastErrorText(mime)); CkMime_Dispose(mime); return; } st = CkStringTable_Create(); success = CkMime_PartsToFiles(mime,"/temp/mimeParts",st); if (success == FALSE) { printf("%s\n",CkMime_lastErrorText(mime)); CkMime_Dispose(mime); CkStringTable_Dispose(st); return; } n = CkStringTable_getCount(st); // Display the paths of the files created: i = 0; while (i < n) { printf("%s\n",CkStringTable_stringAt(st,i)); i = i + 1; } CkMime_Dispose(mime); CkStringTable_Dispose(st); } |
© 2000-2025 Chilkat Software, Inc. All Rights Reserved.