Is there a problem if timeout is disabled?



Usually there isn't. But, there can be some unexpected long waits in the event handlers you implemented, and some influence from third-party system components. For example, for antivirus software that has filesystem filter drivers that attach above CBFS Connect, it's recommended to set the timeout to a value you determine to be expected and comfortable for users. A timeout of 30 sec or 1 min is fine. It helps to avoid deadlocks and very long waits in the system. You can additionally use the ResetTimeout method for fine-tuning if your event handler needs to execute longer than the timeout that is specified in the MountMedia call.

Additionally, it's usually better to disable the timeouts during development (by setting the Timeout parameter of the MountMedia method to 0). This helps you to step through code in event handlers as long as you need while debugging. Note that some Windows API functions have internal timeouts which are quite short (2-3 seconds). In this situation, neither the ResetTimeout method nor setting Timeout to 0 can change the system behavior.

We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at support@callbacktechnologies.com.