Wine Documentation | ||
---|---|---|
<<< Previous | Debug Logging | Next >>> |
Resource identifiers can be either strings or numbers. To make life a bit easier for outputting these beasts (and to help you avoid the need to build the message in memory), I introduced a new function called debugres.
The function is defined in debugstr.h and has the following prototype:
LPSTR debugres(const void *id); |
It takes a pointer to the resource id and returns a nicely formatted string of the identifier. If the high word of the pointer is 0, then it assumes that the identifier is a number and thus returns a string of the form:
#xxxx |
where xxxx are 4 hex-digits representing the low word of id.
If the high word of the pointer is not 0, then it assumes that the identifier is a string and thus returns a string of the form:
'<identifier>' |
Thus, to use it, do something on the following lines:
#include "debug.h" ... YYY(xxx, "resource is %s", debugres(myresource)); |
<<< Previous | Home | Next >>> |
In-memory messages | Up | The --debugmsg command line option |