Closed gumbarros closed 5 months ago
The actual behavior is by design. If you take a look at the header file or the docs, you'll see that the parameter is defined as LPVOID lpFindFileData
, which in C# translates to void*
.
In fact the docs suggest that the type of data that is initialized here depends on other arguments, so assuming it is WIN32_FIND_DATAW
sounds like it would lead to malfunctions in at least some cases.
But this shouldn't block you. If you expect a WIN32_FIND_DATAW
struct to be initialized based on your other arguments, go ahead and create such a struct and then pass a pointer to it as the argument.
Actual behavior
FindFirstFileExFromApp
generatevoid*
atlpFindFileData
Expected behavior
FindFirstFileExFromApp
should generateout WIN32_FIND_DATAW
atlpFindFileData
Repro steps
NativeMethods.txt
content:FindFirstFileExFromApp FindNextFile FindClose FileTimeToSystemTime WIN32_FIND_DATAW
To:
The new code don't compile because lpFindFileData is
void*
Context
net8.0