revised winmm GetDevCaps better pointer check patch

Alexandre Julliard julliard at
Mon Jun 14 13:39:03 CDT 2004

Robert Reif <reif at> writes:

> +/* Use the first version for strict compatibility with Microsoft */
> +/* #define WINMM_IsBadWritePtr(x,y) IsBadWritePtr((x), (y)) */
> +#define WINMM_IsBadWritePtr(x,y) ((x)==NULL)

This is very confusing, if we don't check the pointer we shouldn't
have a macro that looks like we do. The proper way is to add exception
handlers in functions where an app explicitly relies on the pointer
check, and not add checks otherwise; using the IsBad*Ptr functions is
always wrong since they are not thread-safe.

Alexandre Julliard
julliard at

More information about the wine-devel mailing list