http://bugs.winehq.org/show_bug.cgi?id=7711
--- Comment #33 from Alexander K. Seewald alex@seewald.at 2008-01-10 01:41:04 --- Hans, it is exactly as you found. Once the device is plugged in when TomTom Home is running, it regularily tries to find it, but fails. The new drive (D:) now appears in Winefile when I plug the TomTom in even without the dosdevices link, thus it works so far.
At the beginning, it enumerates all volumes. Again GetDriveTypeW seems to be important. Here the TomTom does not seem to be plugged in.
0034:Call user32.SetWindowsHookExW(00000004,0189c1b0,00000000,00000034) ret=0189d233 0034:Ret user32.SetWindowsHookExW() retval=00020056 ret=0189d233 0034:Call KERNEL32.FindFirstVolumeW(0034e8ec,00000104) ret=0189c7bc 0034:Ret KERNEL32.FindFirstVolumeW() retval=001744a0 ret=0189c7bc 0034:Call KERNEL32.GetDriveTypeW(0034e8ec L"\\?\Volume{00000000-0000-0000-0000-000000000043}\") ret=0189c7db 0034:Ret KERNEL32.GetDriveTypeW() retval=00000000 ret=0189c7db 0034:Call KERNEL32.FindNextVolumeW(001744a0,0034e8ec,00000104) ret=0189c941 0034:Ret KERNEL32.FindNextVolumeW() retval=00000001 ret=0189c941 0034:Call KERNEL32.GetDriveTypeW(0034e8ec L"\\?\Volume{00000000-0000-0000-0000-00000000005a}\") ret=0189c7db 0034:Ret KERNEL32.GetDriveTypeW() retval=00000000 ret=0189c7db 0034:Call KERNEL32.FindNextVolumeW(001744a0,0034e8ec,00000104) ret=0189c941 0034:Ret KERNEL32.FindNextVolumeW() retval=00000000 ret=0189c941 0034:Call KERNEL32.FindVolumeClose(001744a0) ret=0189c954 0034:Ret KERNEL32.FindVolumeClose() retval=00000001 ret=0189c954 0034:Call KERNEL32.GetLastError() ret=018bac8b 0034:Ret KERNEL32.GetLastError() retval=00000012 ret=018bac8b
After this, it focusses on specifically checking drive D:, which is the TomTom device's mount point in Wine.
0034:Call hook proc 0x189c1b0 (id=WH_CALLWNDPROC,code=0,wp=00000000,lp=0034f5fc) 0034:Call KERNEL32.GetDriveTypeW(0034f154 L"D:") ret=018998f9 0034:Ret KERNEL32.GetDriveTypeW() retval=00000001 ret=018998f9 0034:Call KERNEL32.FindFirstVolumeW(0034ee50,00000104) ret=0189c7bc 0034:Ret KERNEL32.FindFirstVolumeW() retval=001860e8 ret=0189c7bc 0034:Call KERNEL32.GetDriveTypeW(0034ee50 L"\\?\Volume{00000000-0000-0000-0000-000000000043}\") ret=0189c7db 0034:Ret KERNEL32.GetDriveTypeW() retval=00000000 ret=0189c7db 0034:Call KERNEL32.FindNextVolumeW(001860e8,0034ee50,00000104) ret=0189c941 0034:Ret KERNEL32.FindNextVolumeW() retval=00000001 ret=0189c941 0034:Call KERNEL32.GetDriveTypeW(0034ee50 L"\\?\Volume{00000000-0000-0000-0000-00000000005a}\") ret=0189c7db 0034:Ret KERNEL32.GetDriveTypeW() retval=00000000 ret=0189c7db 0034:Call KERNEL32.FindNextVolumeW(001860e8,0034ee50,00000104) ret=0189c941 0034:Ret KERNEL32.FindNextVolumeW() retval=00000000 ret=0189c941 0034:Call KERNEL32.FindVolumeClose(001860e8) ret=0189c954 0034:Ret KERNEL32.FindVolumeClose() retval=00000001 ret=0189c954 0034:Call user32.CallNextHookEx(00000000,00000000,00000000,0034f5fc) ret=0189c348 0034:Call hook proc 0x86abd8 (id=WH_CALLWNDPROC,code=0,wp=00000000,lp=0034f5fc)
Not sure what GetDriveTypeW is supposed to do, but the retval for D: is clearly different from the one for the two other internal drives... so why doesn't it work yet? Both the type and the fact that it is a new drive should be sufficient for identifying the TomTom. The full +relay trace is at http://alex.seewald.at/files/log.relay.new.gz, perhaps it helps.