Opens the process window.
GSErrCode ACAPI_Interface ( APIIo_InitProcessWindowID, const GS::UniString* title, short* nPhase, API_ProcessControlTypeID* processCntrolType );
Parameters
- title
- [in] Process string.
- nPhase
- [in] Number of phases.
- processCntrolType
- [in]
Return Values
NoError
- The function has completed with success.
APIERR_BADPARS
nPhase
isnullptr
For other common API errors see the API Errors document.
Remarks
This function is used to prepare the process window for a long operation. You can specify the name of the whole operation and the number of the phases of the process.
Other process window related functions are:
- APIIo_SetNextProcessPhaseID
- APIIo_SetProcessValueID
- APIIo_IncProcessValueID
- APIIo_IsProcessCanceledID
- APIIo_CloseProcessWindowID
Example
GSErrCode err; API_LibPart libPart; GS::UniString title ("Listing the library"); GS::UniString subtitle ("working..."); short nPhase; Int32 i, nLib; char buffer [256]; err = ACAPI_LibPart_GetNum (&nLib); if (nLib > 0) { nPhase = 1; ACAPI_Interface (APIIo_InitProcessWindowID, &title, &nPhase); ACAPI_Interface (APIIo_SetNextProcessPhaseID, &subtitle, &nLib); BNZeroMemory (&libPart, sizeof (API_LibPart)); for (i = 1; i <= nLib; i++) { libPart.index = i; err = ACAPI_LibPart_Get (&libPart); if (!err) { sprintf (buffer, "[%2d] \"%s\"", i, (const char *) GS::UniString (libPart.docu_UName).ToCStr ()); ACAPI_WriteReport (buffer, false); } ACAPI_Interface (APIIo_SetProcessValueID, &i, nullptr); if (ACAPI_Interface (APIIo_IsProcessCanceledID, nullptr, nullptr)) break; } ACAPI_Interface (APIIo_CloseProcessWindowID, nullptr, nullptr); }
Requirements
- Version: API 2.1 or later
- Header: APIdefs_Interface.h
See Also
APIIo_SetNextProcessPhaseID, APIIo_SetProcessValueID, APIIo_IncProcessValueID, APIIo_IsProcessCanceledID, APIIo_CloseProcessWindowID,
ACAPI_Interface, API Functions