Microsoft KB Archive/260337

= HOWTO: Use the Sleep API to Pause Program Execution in a DLL =

Article ID: 260337

Article Last Modified on 7/13/2004

-

APPLIES TO


 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q260337



SUMMARY
The Sleep application program interface (API), causes the current program to suspend execution for a specified number of milliseconds. This is useful when you need to pause code execution in a DLL or multi-threaded DLL.



MORE INFORMATION
Since you can not have an interface in a DLL, you can not use a WAIT or =INKEY function. The following code shows you how to declare the Sleep API and then how to call the Sleep API.

The number you pass to the API is in milliseconds. DECLARE Integer Sleep IN Win32API Integer =Sleep(5000)     && Pause for 5 seconds NOTE: APIs are case sensitive. So, make sure that you type the command exactly as shown.

