The Windows main loop is done by as a single function call, wb_main_loop(), that must be called if the application has a window. This function uses the standard Windows approach, that is, a loop that uses the API function GetMessage() to retrieve a message from the queue and DispatchMessage() to send it to the window procedure.
All the additional tasks needed to run a Windows program, including DLL loading, initialization, and cleanup, are done when PHP calls the WinBinder library upon startup.
There are a few special cases where a Windows programs will not need a message loop, namely when the only tasks to be performed are the creation of message boxes or system dialog boxes. For example:
|
Creating WinBinder applications
Windows messages
wb_main_loop