W dniu 07.09.2010 12:09, Florian Köberle pisze:
Hello
when running a program using wine it's possible to log +message to get informed about all the messages which get sent. This debug channel displays the macro names like WM_NOTIFY instead of numbers. The most other debug channels and the regression tests however display numbers.
Functions like SPY_GetMsgName which can make window messages more human readable can be found in dlls/user32/spy.c.
Is there a acceptable way of making functions like SPY_GetMsgName available to other libraries and tests?
There are about 80 TRACE/trace lines which could be improved: egrep "trace.*hwnd.*lParam" dlls/ -R -i -I|grep -v user32|wc
Best regards, Florian
Hello
In my opinion it would be good to make it available in similar way, as functions like debugstr_guid, which are defined in include/wine/debug.h
Messages' names are declared as an array MessageTypeNames in spy.c . Maybe it would be enough to copy it into the header and wrap access to it into simple function like debugstr_msg()? This is easiest way, but in the result there will be copy of array in each .so library. There will be also problem with multiple reference, but this may be solved following solution used in test.h.
I'm not so familiar with this, so maybe other, more experienced devs could say something about this idea.
Mariusz Pluciński