I know this is a c forum and all but this is worth asking. Anyways I made a DLL in C++ that changes the owner of certain files (might be as many as a few hundred thousand files...) so the DLL call may take a long time to finish and I want to have a cancel feature. The DLL is called from VB6.
I thought I could pass a boolean to the DLL by reference and change that variable in VB when the user clicks the cancel button. Check that variable in the DLL during the loop and exit the function call if the boolean variable is true.
This seems kinda hackish to me, and dont really like the idea. Is there a better way of doing it?