KcsStatusId KcsOptimizeProfile(KcsProfileId profile, KcsOptimizationType optimizationType, KcsLoadHints operationLoadSet) |
Use KcsOptimizeProfile() to optimize the profile by:
Optimization is CMM dependent. The CMM always interprets the load hints in terms of the particular situation.
If your application has minimized a profile's load operation or state with operationLoadSet or with KcsOptimizeProfile(), only that load operation or state is saved with KcsSaveProfile(). Therefore, operations not included in the profile are not available the next time the profile is loaded.
Argument |
Description |
---|---|
profile |
The identifier of the profile. |
optimizationType |
The kinds of optimization (size, speed, and accuracy) your application wants to perform on the profile. (See "KcsOptimizationType" for more information.) When a combination of values is specified, it is up to the CMM to determine which value is more important. |
operationLoadSet |
One or more flags symbolizing the kind of information wanted in profile. It also describes what, how, when, and where to load and unload profile. See "KcsLoadHints " for more information. |
KCS_SUCCESS |
KCS_OPERATION_CANCELLED |
KCS_MEM_ALLOC_ERROR |
KCS_PROF_ID_BAD |
KcsProfileId monitorProfile, scannerProfile, completeProfile; KcsStatusId status; KcsErrDesc errDesc; /* The monitor profile and scanner profile have been loaded and connected * * to become a complete profile, now optimize. */ status = KcsOptimizeProfile(completeProfile, KcsOptSpeed, KcsLoadAllNow); if (status != KCS_SUCCESS) { status = KcsGetLastError(&errDesc); fprintf(stderr,"KcsOptimizeProfile failed error = %s\n", errDesc.desc); KcsFreeProfile(monitorProfile); KcsFreeProfile(scannerProfile); return(-1); } |