I have a Windows C++ app that crashes on user computers from time to time. I didnt write the app and it doesnt have its own logging. Is there a tool / utility I could use that is able to log some useful information when the application exits (e.g. the file and line number where the crash occurred)? The end user's component does not have Visual Studio.
You can use BugTrap which catches unhandled exceptions and reports them via email or other means. The setup is pretty simple. The only difficulty will be to correctly setup the *.pdb *.dll *.exe for the minidump.
By adding dump generating to the program, you can use post-mortem debugging. Crash dump is created by MiniDumpWriteDump function. This dump can be sent to developer computer and debugged. More about this here:
http://www.codeproject.com/KB/debug/postmortemdebug_standalone1.aspx
"the file and line number where the crash occurred"
That would be possible only if the code were built with debug information included. If your users are prepared to install VC++ Express, they could attach to the process with its debugger after the crash, but without the source they will simply see assembler code, and without debug information that may be of limited help in any case.