10-21-2006, 04:22 AM | #1 |
Addict
Posts: 364
Karma: 1035291
Join Date: Jul 2006
Location: Redmond, WA
Device: iPad Mini,Kindle Paperwhite
|
Logging ebookUsb.dll calls
If anyone is interested, I have made a replacement ebookUsb.dll that can be dropped in to the reader software directory. It logs all the calls into the DLL to a file c:\reader.log (and then calls into the real DLL; i.e. its just a thin wrapper).
Note that you *will* need to modify your existing ebookUsb.dll, changing the name to ibookUsb.dll, and changing the first letter of each entry point to be an I (so the Usb* functions become Isb* and the CheckBlock function becomes IheckBlock). Obviously you should keep a backup first. I'm not including a patched version of the original DLL due to copyright and other restrictions. VS.Net project is available here . You can also use this to set breakpoints in calls in the VS debugger, etc. I did this mostly to figure out why my prsutils prog isn't copying files, but it could be useful to others who want to take things much further than I'm interested in going. Last edited by geekraver; 10-21-2006 at 04:33 AM. |
10-21-2006, 09:54 AM | #2 | |
Enthusiast
Posts: 27
Karma: 10
Join Date: Oct 2006
Device: Sony Reader
|
Quote:
Code:
; ibookUsb.def LIBRARY "ibookUsb" EXPORTS ... IheckBlock = CheckBlock ... |
|
Advert | |
|
12-29-2006, 09:25 PM | #3 |
Junior Member
Posts: 3
Karma: 10
Join Date: Dec 2006
Location: Seattle, WA
Device: Sony PRS-500
|
GetProcAddress version
I modded the file to use LoadLibrary/GetProcAddress instead, which means you don't need to modify the original ebookUsb.dll in any way except temporarilty renaming it to ebookUsb.org.dll. However, I hesitate to release it as it crashes after a while ... I'll track that down -- but in the meantime, geekraver, as you seeing the same with your code? (seems to run fine for a while but then crashes after a call to UsbBeginEnd?)
|
12-29-2006, 09:35 PM | #4 |
creator of calibre
Posts: 44,548
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can also log the actual USB packets for more information using one of the many freely available USB packet sniffers.
|
12-30-2006, 02:06 AM | #5 | |
Addict
Posts: 364
Karma: 1035291
Join Date: Jul 2006
Location: Redmond, WA
Device: iPad Mini,Kindle Paperwhite
|
Quote:
Guess you finally got yourself a reader for Xmas, eh Dave? |
|
Advert | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trouble logging in to Philly Free Library | JSWolf | General Discussions | 12 | 10-17-2010 09:28 PM |
Desktop app: libusb0.dll was not found. | mwlcarter | Kobo Reader | 3 | 07-17-2010 02:01 AM |
Unhandled exception in calibre.exe (python26.dll) | jusmee | Calibre | 0 | 12-14-2009 01:53 AM |
Why do I have to keep logging in? | Laine | Feedback | 7 | 02-01-2009 02:01 PM |
Trouble Logging In To Connect Reader | bspill | Sony Reader | 2 | 11-11-2006 10:21 AM |