1. How can a query in progress be stopped?
Performing another query will cancel the old query.
Ending your process will also cancel the current query.
To cancel a query, I recommend doing an empty search.
This query will be instant and use no memory.
2. Does EVERYTHING_IPC_IS_DB_BUSY only react if a search is in progress, or is there a better way to know if a query is in progress?
You will need to poll EVERYTHING_IPC_IS_DB_BUSY every few milliseconds to determine if the Everything database is busy.
This will return TRUE for other queries too, so I recommend assuming Everything is still querying until you receive your query reply.
Use bWait=FALSE with
Everything_Query.
Assume Everything is querying until
Everything_IsQueryReply succeeds.