A couple of suggestions:
- There is no point in testing last error if an API didn't fail
Couldn't it be that the API sets ERROR_SUCCES if it doesn't fail?
- It would be helpful to simultaneously test return values and
last error for FindResource, which should have similar behaviour (and the bug) to FormatMessage
Could you explain a bit more what exactly to test? I can load the whole messagetable with FindResource from kernel32, but that always succeeds of course.
Using the MESSAGE_RESOURCE_BLOCK and MESSAGE_RESOURCE_ENTRY structures I could I load a messagestring I guess, but that doesn't test the behaviour of FindResource anymore. Or do i see things wrong here?
Trying to load a non existing messagetable from another dll with FindResource gives ERROR_RESOURCE_TYPE_NOT_FOUND. Or is that not what you meant?
and drop FormatMessageW tests.
Ok i'll do that