Hi, I'm trying to figure out why an app works on Windows but not Wine, and it'd sure be nice to be able to log all the api calls the app makes under each of the two environments; then perhaps I could compare the logs to see where Wine differed from Windows.
Does anyone else do stuff like that? If so, what tools do you use?
http://www.wheaty.net/FAQ.htm#APISPY32 says that the best tool out there is http://www.internals.com/utilities_main.htm (Supposedly the author will send source to you on request, too.) That program requires a text file containing the prototype for each API you want to spy on, though, and it only comes with 3 APIs as an example. Does anyone have a full version of that file, or a perl script to create it from the wine tree?
I suppose I could write my own, too, if that's the only way to get a tool that works well in both environments. http://help.madshi.net/ApiHookingMethods.htm seems to have lots of info on that.
Dan Kegel wrote:
Hi, I'm trying to figure out why an app works on Windows but not Wine, and it'd sure be nice to be able to log all the api calls the app makes under each of the two environments; then perhaps I could compare the logs to see where Wine differed from Windows.
Does anyone else do stuff like that? If so, what tools do you use?
You had previously mentioned having a copy of msvc. Did you check in it for SPY++? I would have to say that it seems to work quite well under Wine.
Duane Clark wrote:
Dan Kegel wrote:
I'm trying to figure out why an app works on Windows but not Wine, and it'd sure be nice to be able to log all the api calls the app makes under each of the two environments; then perhaps I could compare the logs to see where Wine differed from Windows.
Does anyone else do stuff like that? If so, what tools do you use?
You had previously mentioned having a copy of msvc. Did you check in it for SPY++? I would have to say that it seems to work quite well under Wine.
The SPYXX.EXE in my copy of msvc4.0 appears to only let you log windows messages, not api calls. Then again, since help doesn't work under Wine, I can't tell if I'm missing something...
Dan Kegel wrote:
The SPYXX.EXE in my copy of msvc4.0 appears to only let you log windows messages, not api calls. Then again, since help doesn't work under Wine, I can't tell if I'm missing something...
Oops, my mistake. That's right.
Hey Dan,
We've looked into this extensively; looking at both flavors of apispy (yes, there are two of them, with very similar names), and a lot of other variations.
However, I've got a half baked W2K based solution similar to the Detours library from Microsoft. The advantage to my approach is that it generates a relay log identical to that of Wine, which then allows for diffing the log files.
If you'd like to work on this, this might well be a great project for you, and I'd be happy to do a brain dump and transfer the work to you.
*I* think it would be wicked cool. Sadly, most of the Wine gurus I work with just shake their head and smile whenever I suggest it deserves priority.
Cheers,
Jer
On Wed, 2003-01-01 at 17:30, Dan Kegel wrote:
Hi, I'm trying to figure out why an app works on Windows but not Wine, and it'd sure be nice to be able to log all the api calls the app makes under each of the two environments; then perhaps I could compare the logs to see where Wine differed from Windows.
Does anyone else do stuff like that? If so, what tools do you use?
http://www.wheaty.net/FAQ.htm#APISPY32 says that the best tool out there is http://www.internals.com/utilities_main.htm (Supposedly the author will send source to you on request, too.) That program requires a text file containing the prototype for each API you want to spy on, though, and it only comes with 3 APIs as an example. Does anyone have a full version of that file, or a perl script to create it from the wine tree?
I suppose I could write my own, too, if that's the only way to get a tool that works well in both environments. http://help.madshi.net/ApiHookingMethods.htm seems to have lots of info on that.
-- Dan Kegel Linux User #78045 http://www.kegel.com
Jeremy White wrote:
Hey Dan,
We've looked into this extensively; looking at both flavors of apispy (yes, there are two of them, with very similar names), and a lot of other variations.
However, I've got a half baked W2K based solution similar to the Detours library from Microsoft. The advantage to my approach is that it generates a relay log identical to that of Wine, which then allows for diffing the log files.
If you'd like to work on this, this might well be a great project for you, and I'd be happy to do a brain dump and transfer the work to you.
*I* think it would be wicked cool. Sadly, most of the Wine gurus I work with just shake their head and smile whenever I suggest it deserves priority.
That does sound awesome. Yes, proceed with brain dump, please. Worst case, this will let others work on it even if I fail to make progress. Thanks! - Dan
"Jeremy White" jwhite@codeweavers.com wrote:
We've looked into this extensively; looking at both flavors of apispy (yes, there are two of them, with very similar names), and a lot of other variations.
However, I've got a half baked W2K based solution similar to the Detours library from Microsoft. The advantage to my approach is that it generates a relay log identical to that of Wine, which then allows for diffing the log files.
Debugging Tools for Windows http://www.microsoft.com/ddk/debugging has logger.exe/logviewer.exe which help a lot in investigating what actually windows applications do. Logger creates binary log files which logviewer is able to parse/view. Even there is a mechanism to extend the logging facility by simply editing a .h like files.
Logviewer is able to show all the API arguments, various data structures, API results and more. It can export log into the plain text file, which could be diffed against another one. I would say that log file is *very* similar to the Wine relay log. Just give it a try.
Dan Kegel wrote:
http://www.wheaty.net/FAQ.htm#APISPY32 says that the best tool out there is http://www.internals.com/utilities_main.htm (Supposedly the author will send source to you on request, too.) That program requires a text file containing the prototype for each API you want to spy on, though, and it only comes with 3 APIs as an example. Does anyone have a full version of that file, or a perl script to create it from the wine tree?
Hi,
You could look at : http://www.dxspy.com/
For hooks : http://www.codeproject.com/system/hooksys.asp
Tom