add GetTempFileNameW#134
Conversation
| UINT WINAPI GetTempFileNameW(LPCWSTR lpPathName, LPCWSTR lpPrefixString, UINT uUnique, LPWSTR lpTempFileName) { | ||
| HOST_CONTEXT_GUARD(); | ||
| DEBUG_LOG("GetTempFileNameW -> "); | ||
| if (!lpPathName || !lpPrefixString || !lpTempFileName) { |
There was a problem hiding this comment.
Null lpPrefixString should be treated as empty, not invalid (your added test fails when run with wine)
There was a problem hiding this comment.
good point. the existing GetTempFileNameA was doing the same, but it was untested, so it was not obvious. I changed both also with a test for the A variant. I can't test against Wine on this machine but I'll do as soon as I have access to one.
There was a problem hiding this comment.
I managed to test with Wine, on an arm mac. test_gettempfilename was already failing on current main branch for me. I added a fix for one fail:
Only the lower 16 bits of the uUnique parameter are used.
see https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-gettempfilenamea#remarks
Note it's still failing on my test machine because of expected file path having .TMP in upper-case letters, while for me it is lower-case (test file line 27). I will look into this when I have time.
54b10c1 to
2c331c0
Compare
|
Thanks! |
needed by LINK.EXE in MSVC 4.2 when linking with a resource file