Hi,
I'm trying to install Microsoft's MMC (W2K3) and it crashes every now and then with different symptoms.
I've tracked it down to what I think is a fault in the application that triggers a bug in Wine. All inf files that are read are closed with SetupCloseInfFile but the app is still trying to use the handle in a call to SetupFindFirstLineA.
On Windows (tested on W2K3) this will lead to a failure of SetupFindFirstLineA with a last error of ERROR_INVALID_HANDLE. On Wine we don't check the handle and thus the outcome cannot be predicted (mostly crash).
What ways do we have to detect invalid handles or better yet how can this be solved?
Hi Paul,
On Windows (tested on W2K3) this will lead to a failure of SetupFindFirstLineA with a last error of ERROR_INVALID_HANDLE. On Wine we don't check the handle and thus the outcome cannot be predicted (mostly crash).
What ways do we have to detect invalid handles or better yet how can this be solved?
When we detect application usage like this, the usual approach is to avoid returning pointers as handles, and instead introduce the use of a handle table. Then closed handles can be detected. --Juan