(Unicode C) Transition from Zip.AppendSb to Zip.AddSb
Provides instructions for replacing deprecated AppendSb method calls with AddSb. Note: This example requires Chilkat v11.0.0 or greater.
#include <C_CkZipW.h>
#include <C_CkStringBuilderW.h>
void ChilkatSample(void)
{
HCkZipW zip;
const wchar_t *pathInZip;
HCkStringBuilderW sb;
const wchar_t *charset;
BOOL success;
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);
}
|