You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The FindFirstFileEx family of functions (FindFirstFileExW, FindFirstFileExA, FindFirstFileExFromAppW, FindFirstFileTransactedA, FindFirstFileTransactedW) all have an out void* lpFindFileData parameter where the size and structure of the buffer written is documented to be based on the fInfoLevelId enum parameter (documented at https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ne-minwinbase-findex_info_levels). However, both values of that enum have the same result of writing a WIN32_FIND_DATA (there are A and W versions). The SAL annotations also acknowledge this -- for example FindFirstFileExW is annotated _Out_writes_bytes_(sizeof(WIN32_FIND_DATAW)) LPVOID lpFindFileData.
Ideally the type for lpFindFileData could change to WIN32_FIND_DATA for the greatest clarity, but if not, annotating it with NativeArrayInfoAttribute would help with marshaling.
The text was updated successfully, but these errors were encountered:
The FindFirstFileEx family of functions (FindFirstFileExW, FindFirstFileExA, FindFirstFileExFromAppW, FindFirstFileTransactedA, FindFirstFileTransactedW) all have an out
void* lpFindFileData
parameter where the size and structure of the buffer written is documented to be based on thefInfoLevelId
enum parameter (documented at https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ne-minwinbase-findex_info_levels). However, both values of that enum have the same result of writing a WIN32_FIND_DATA (there are A and W versions). The SAL annotations also acknowledge this -- for example FindFirstFileExW is annotated_Out_writes_bytes_(sizeof(WIN32_FIND_DATAW)) LPVOID lpFindFileData
.Ideally the type for
lpFindFileData
could change toWIN32_FIND_DATA
for the greatest clarity, but if not, annotating it withNativeArrayInfoAttribute
would help with marshaling.The text was updated successfully, but these errors were encountered: