This example shows how to create and free a conversion object.
#include <stdio.h> #include <uconv.h> int main(void) { UconvObject uconv_object = NULL; int rc = ULS_SUCCESS; /********************************************************************/ /* Create a conversion object based upon the process code page */ /* setting with the path modifier set */ /********************************************************************/ rc = UniCreateUconvObject((UniChar *)L"@path=yes", &uconv_object); if (rc != ULS_SUCCESS) { printf("UniCreateUconvObject error: return code = %u\n", rc); return 1; } rc = UniFreeUconvObject(uconv_object); if (rc != ULS_SUCCESS) { printf("UniFreeUconvObject error: return code = %u\n", rc); return 1; } return ULS_SUCCESS; }