Sample code for 30+ languages & platforms
Unicode C

Transition from Zip.AppendSb to Zip.AddSb

Provides instructions for replacing deprecated AppendSb method calls with AddSb.

Chilkat Unicode C Downloads

Unicode C
#include <C_CkZipW.h>
#include <C_CkStringBuilderW.h>

void ChilkatSample(void)
    {
    BOOL success;
    HCkZipW zip;
    const wchar_t *pathInZip;
    HCkStringBuilderW sb;
    const wchar_t *charset;

    success = FALSE;

    zip = CkZipW_Create();

    //  ...
    //  ...
    pathInZip = L"example.txt";
    sb = CkStringBuilderW_Create();
    CkStringBuilderW_Append(sb,L"This is a test");
    charset = L"utf-8";

    //  ------------------------------------------------------------------------
    //  The AppendSb method is deprecated:

    success = CkZipW_AppendSb(zip,pathInZip,sb,charset);

    //  ------------------------------------------------------------------------
    //  For consistency, the name has changed to AddSb.

    success = CkZipW_AddSb(zip,pathInZip,sb,charset);


    CkZipW_Dispose(zip);
    CkStringBuilderW_Dispose(sb);

    }