On Wed Nov 15 21:05:11 2023 +0000, Zebediah Figura wrote:
Because it doesn't really matter,
On what grounds?
and it makes our implementation simpler.
It makes our implementation simpler to type E_INVALIDARG rather than HRESULT_FROM_WIN32(ERROR_INVALID_NAME)?
In the past when I've added tests for behavior that differs from one Windows version to another, I've been asked to designate one behavior as the "correct" behavior and mark the other as broken. In this case, the applications in question require the function to report success, so testing and implementing the function's argument checking is really just to help us understand what the arguments are. The patch already has an if statement that returns E_INVALIDARG, and it would be slightly simpler to add to the existing if statement than to add a second if statement to return HRESULT_FROM_WIN32(ERROR_INVALID_NAME).
If you would prefer to return HRESULT_FROM_WIN32(ERROR_INVALID_NAME) instead, or to not handle that error case at all in the stub implementation (as Fabian originally proposed), that's totally fine. The applications we're trying to support will work either way.