Chilkat
HOME
Android™
ASP
Visual Basic
VB.NET
C#
iOS (IPhone)
Objective-C
C++
C
MFC
Delphi
FoxPro
Java
Perl
PHP Extension
PHP ActiveX
Python
PowerShell
Ruby
SQL Server
VBScript
Decode Base64 MIME BodyDecoding a MIME body from Base64. Downloads: MS Windows Visual C/C++ Libraries Linux/CentOS C/C++ Libraries MAC OS X C/C++ Libraries Solaris C/C++ Libraries C++ Builder Libraries #include <C_CkMime.h> void ChilkatSample(void) { HCkMime mime; BOOL success; const char * mimeStr1; HCkMime mime2; const char * decodedBody; mime = CkMime_Create(); success = CkMime_UnlockComponent(mime,"Anything for 30-day trial"); if (success == FALSE) { printf("Failed to unlock component\n"); return; } // Create MIME with base64 encoding: CkMime_SetBodyFromPlainText(mime,"This is a test"); CkMime_putCharset(mime,"windows-1252"); CkMime_putEncoding(mime,"base64"); mimeStr1 = CkMime_getMime(mime); printf("%s\n",mimeStr1); printf("-------------------------------\n"); // Output looks like this: // Content-Type: text/plain; // charset="windows-1252" // content-transfer-encoding: base64 // // VGhpcyBpcyBhIHRlc3Q= // Load the MIME into another Chilkat MIME object: mime2 = CkMime_Create(); CkMime_LoadMime(mime2,mimeStr1); // Get the MIME body decoded: decodedBody = CkMime_getBodyDecoded(mime2); // Prints: this is a test printf("%s\n",decodedBody); CkMime_Dispose(mime); CkMime_Dispose(mime2); } |
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.