thank you very much,it's ok
Public Declare Function Everything_QueryW Lib "Everything32.dll" (ByVal bWait As Long) As Long
dll api for searching files, stuck in my program process. if the dll can be searched with multiple threads, the current api uses events until the search is completed, so that my main program cannot respond to events such as drag or mouse.
like this: winhttprequest>> waitforresponse ,for download htm or zip file.
https://learn.microsoft.com/zh-cn/windo ... dfrom=msdn
the waitforresponse method waits for the asynchronous send method to complete (with an optional timeout value in seconds).
hresult waitforresponse(
[in, optional] variant timeout,
[out, retval] variant_bool *succeeded
);
can be used
Code: Select all
SetWaitableTimer+MsgWaitForMultipleObjects
If SetWaitableTimer(JshTimer, CCur(-Milliseconds)) Then
Do While MsgWaitForMultipleObjects(1&, JshTimer, FAL_SE, INFINITE, QS_ALLINPUT) And NoData '从1变成0就结束了
DoEvents
Loop
end if
yesterday i researched someone else's dll calling microsoft's edge webview2 browser, and he was all synchronous and stuck in the window.
create a wb, open the url, and add an 8-second delay. if it fails or the website is stuck, the program also gets stuck.
i created 2 web objects at the same time, and it turned out to take 16 seconds to complete.
later, it was found that these two apis had to add parameter 0 to "call asynchronously", so that basically 1 second was completed, and the creation of 3 5 browser controls was estimated to be about 1 second.