kernel32: add more tests for FormatMessage{A,W}

Louis Lenders xerox_xerox2000 at
Wed Oct 28 07:25:16 CDT 2009

>A couple of suggestions:
>1. 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?

>2. 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


More information about the wine-devel mailing list