- Linux MultiMedia Studio Computer Accessories User Manual
Mint v4 PC Programming Guide
26
MN1278 05.2001
When using the Active Control, warning messages such as the dialog above ( taken from a Visual Basic
application ) may be shown for slow operations such as file download. This is because the application expects
the ActiveX operation to finish its operation in a certain time ( the default for Visual Basic is five seconds. ) It
should be able to change these timeouts or remove the check completely, the method will be different for each
language. The following sections give advice on how to do this in Visual Basic and Visual C.
“Component Request Pending” in VB.
This error ( as shown in the dialog above ) can be prevented by adding the following code before the function
which times out is called.
App.OleRequestPendingTimeout = 60000
This will increase the timeout to a minute ( the timeout is in milliseconds. ) If this is still not long enough, the
value can be increased.
“Server Busy” in a Visual C MFC Application.
This is described fully in the Microsoft MSDN article Q248019 HOWTO: Prevent Server Busy Dialog Box From
Appearing During a Lengthy COM Operation.
To solve the problem add the following lines of code to the CWinapp derived classes InitInstance function.
AfxOleInit();