Sample code for 30+ languages & platforms
C

Save Web Page as .mht Web Archive

See more MHT / HTML Email Examples

Downloads a web page into a .mht web archive.

Chilkat C Downloads

C
#include <C_CkMht.h>

void ChilkatSample(void)
    {
    BOOL success;
    HCkMht mht;

    success = FALSE;

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    mht = CkMht_Create();

    success = CkMht_GetAndSaveMHT(mht,"http://www.bonairefishing.com/","bonairefishing.mht");
    if (success != TRUE) {
        printf("%s\n",CkMht_lastErrorText(mht));
        CkMht_Dispose(mht);
        return;
    }
    else {
        printf("MHT Created!\n");
    }



    CkMht_Dispose(mht);

    }