08-31-2022, 01:59 PM
(This post was last modified: 08-31-2022, 02:06 PM by SpriggsySpriggs.)
I noticed in your "FINDDATA.BAS" file that you've also declared "FindFirstFileW" and "FindNextFileW". Were you planning on making a version that would enable usage of unicode (wide) strings?
Side note: You should change your declarations from UNSIGNED OFFSET to just OFFSET as an invalid handle return in Win32 API is a -1 but since you are currently casting them to UNSIGNED, you won't notice the failure unless you cast them back to a signed OFFSET. This would be your "FindFirstFileA/W" and "FindNextFileA/W" declarations. Typically, you'd only ever use an UNSIGNED OFFSET for a wParam in Win32.
I'd still change the UNSIGNED OFFSETs to OFFSET just for matching of the data types but it does look like INVALID_HANDLE_VALUE will be caught just fine.
Side note: You should change your declarations from UNSIGNED OFFSET to just OFFSET as an invalid handle return in Win32 API is a -1 but since you are currently casting them to UNSIGNED, you won't notice the failure unless you cast them back to a signed OFFSET. This would be your "FindFirstFileA/W" and "FindNextFileA/W" declarations. Typically, you'd only ever use an UNSIGNED OFFSET for a wParam in Win32.
I'd still change the UNSIGNED OFFSETs to OFFSET just for matching of the data types but it does look like INVALID_HANDLE_VALUE will be caught just fine.
Tread on those who tread on you