bool Unload() { if (_library != NULL) { if (FreeLibrary(_library) == 0) { return false; } _library = NULL; UnloadFunctions(); } return true; }
/** * Shuts down (unloads) the device. * Ideally this method will completely unload the device and release all resources. * Shutdown() may be called multiple times in a row. * Required by the MM::Device API. */ int MUCamSource::Shutdown() { if (initialized_) { MUCam_closeCamera(hCameras_[currentCam_]); for (int i = 0; i<cameraCnt_; i++) { if (hCameras_[i]) { MUCam_releaseCamera(hCameras_[i]); hCameras_[i] = 0; } } cameraCnt_ = 0; } initialized_ = false; UnloadFunctions(); return DEVICE_OK; }