


If the user quits the application before the background load finishes, calling BackgroundLoadFinish is necessary. In this sample, we call it before allowing the application to exit. assert(BackgroundLoadGetExitStatus()) īackgroundLoadFinish blocks until a background load runs to completion. It returns true if the load succeeded and false if it failed. 当后台加载完成的时候返回NiStream::IDLE。当后台加载还在进行的时候返回NiStream::LOADING 如果一个非NULL的pkState参数传入BackgroundLoadPoll 并且BackgroundLoadPoll 返回NiStream::LOADING, pkState指向的结构被填充后台加载进度的值。īool NiStream::BackgroundLoadGetExitStatus() const Īfter BackgroundLoadPoll indicates that the background load has finished, BackgroundLoadGetExitStatus is used to determine whether the background load succeeded. These values are used in this sample to calculate the values displayed on the screen that indicate the progress of the background load.īackgroundLoadPoll 用来查询后台加载的情况. If a non-NULL pointer is passed as the pkState argument to BackgroundLoadPoll and BackgroundLoadPoll returns NiStream::LOADING, the structure pointed to by pkState is filled in with values that indicate the progress of the background load. It returns NiStream::LOADING while the background load is in progress. It returns NiStream::IDLE when the background load has finished. NiStream::ThreadStatus NiStream::BackgroundLoadPoll(LoadState* pkState) īackgroundLoadPoll is used to poll the status of the background load. Void NiStream::BackgroundLoadBegin(const char* pcFileName) īackgroundLoadBegin is used to launch the background load. The following NiStream functions are used to perform the background load in this sample:
