wiki:windows_backend_activity_log

Version 88 (modified by pbatard, 3 years ago) (diff)

--

Activity Log

[MAIN]
o detect WinUSB during enum to prevent WinUSB calls on non WinUSB devices [DONE using driver string: 2009.12.13]
o detect driverless devices during enum for future automated WinUSB driver addon
  - conn_info.CurrentConfigurationValue false => priv->driver = "no_driver" [DONE: 2009.12.14]
  - check errorcode from SetupDi [DONE: 2010.02.06]
o actually read active configuration from conn_info [DONE: 2009.12.15]
o comment the inf with regards to CoInstallers' choice and add provision for Multiple Interfaces (MI_##) [DONE: 2010.01.08]
o xusb winusb test application
  - add string I/O to xusb [DONE: 2009.12.15]
  - full XBox controller support using control requests [DONE: 2010.01.03]
  - bulk I/O against USB key (Bulk-only Mass Storage) [DONE: 2010.01.04]
  - HID test support [DONE (for control): 2010.01.28]
o async (polled/overlapped) I/O
  - crude poll using OVERLAPPED pointers as fds + HasOverlappedIoCompleted [DONE: 2009.12.16]
  - control transfers [DONE: 2010.01.02]
  - retrieve actual length [DONE: 2009.12.16]
  - bulk/interrupt [DONE: 2010.01.04]
  - I/O cancellation [DONE: 2010.01.05]
  - handle async I/O that completed synchronously during request, in compat later and callback, and remove "chill out" error [DONE: 2010.01.20]
o device reset [DONE: 2010.01.05]
o the never ending multiple interfaces handling:
  - generic readout of registry keys and values [DONE: 2009.12.18]
  - retrieve full device path from HKLMSYSTEMCurrentControlSetControlDeviceClasses* [DONE: 2009.12.18]
  - WinUSB interface selection through MI_## [DONE: 2009.12.18]
  - new non-controversial interface enumeration through SetupDi [DONE: 2009.12.30]
  - WinUSB detection for interfaces [DONE: 2009.12.30]
  - better composite interfaces handling, with fully independent interface and composite device drivers [DONE: 2010.01.18]
  - HID composite interface handling [DONE? 2010.01.20]
o poll & pipe redesign
  - support for control fd ("fish in the pipe") [(actually) DONE: 2009.12.22]
  - overlapped support all the way [DONE: 2009.12.22]
  - mutex fd locking [DONE: 2009.12.23]
  - handling of synchronous completion of async requests [DONE: 2010.01.20]
  - use libusb functions for updated fd resubmission [DONE: 2010.03.02]
o better/multiple API handling (refer to libusb-win32-v1) [API_CALL macro - DONE: 2009.12.18]
o sanitize_path & windows_error_string improvements [DONE: 2009.12.18]
o test on WinXP [OK: 2009.12.30]
o test against openocd/libftdi [OK: 2010.01.08]
o cygwin support [DONE: 2010.01.14]
o MSVC full compilation (preferred) or MSVC compatible MinGW lib with MSVC test sample
  - MSVC6 compatibility for windows_usb.c & windows_usb.h only (Michael Plante) [DONE: 2010.01.11]
  - MSVC9 full compatibility (win32) [DONE: 2010.01.11]
  - MSVC9 full compatibility (x64) [DONE: 2010.01.15]
  - MSVC8 full compatibility [DROPPED]
  - MSVC6 full compatibility (Michael Plante) [DONE: 2010.01.21]
o DDK/sources compilation support (Orin Eman) [DONE: 2010.01.20]
o threading/concurrency
  - add concurrency protection in init/exit (Orin Eman) [DONE: 2010.01.27]
  - use a separate thread for the timer functions [DONE: 2010.01.27]
  - windows_compat update (apply Orin's spinlock + critical sections suggestion) [DONE: 2010.01.28]
  - remove pthread dependency and improve Windows files (Orin + Michael) [DONE: 2010.01.30]
o HID API backend [DONE: 2010.01.26]
o API transition for core integration (interface -> usb_interface) [DONE: 2010.01.28]
o provide /MT version of pthread-win32 precompiled binaries [DONE: 2010.02.02]
o official release completion work:
  - merge the concurrency branch back into master [DONE: 2010.01.30]
  - break down core patches and post them for review [DONE: 2010.01.31]
  - go over TODOs and address the ones that can be addressed for first release [DONE: 2010.02.07]
  - write a detailed guide for manual installation of the WinUSB driver [DONE (for Windows 7): 2010.02.whatever]
  - write some detailed notes for pthread-win32 integration on project page [DROPPED: no longer needed]
  - edit relevant text files from core
  - drop autotool requirement and provide a single configure file for source archives [DONE: 2010.03.03]
  - check/improve DLLs produced with MinGW/cygwin (remove -0 suffic/cyg prefix, add versioning info, etc.) [DONE: 2010.03.05]
  - figure out how to produce a release archive (hint: use cygwin's configure) [DONE: 2010.03.03]
  - prevent the use of libusb_pollfd() on Windows [DONE: 2010.03.18]
  - rename the 2005 project file and use them as base for release [DONE: 2010.03.19]
  - run another memory leaks test [PASSED: 2010.03.19]
  - check if the MinGW-w64 bug still occurs [FIXED!: 2010.03.19]
  - document the current Windows restrictions
  - turn ENABLE_DEBUG_LOGGING off for release!
  - remove the _2008 solution files for release!

[EXTRAS]
o default calling convention for Windows [DONE: 2010.04.13]
o rename windows_compat to something better [DONE: 2010.03.02]
o includes cleanup [DONE: 2010.02.24]
o use threads_posix AM var to prevent compilation of dpfp_threaded on MinGW [DONE: 2010.02.24]
o fix the HID report sizes for xusb in Linux [DONE: 2010.03.01]
o put pre-built binaries online
o test pk2cmd against libusb 1.0 win [DONE: 2010.02.16]
o compatibility layer for Windows [SEEMS TO WORK: 2010.03.06]
o automated driver installation [WIP]
o move real-time timer API call out of timer thread [DONE (Michael Plante): 2010.02.11]
o remove pthread-win32 usage from core [DONE (Michael Plante, Peter Stuge): 2010.02.20]
o libusb0.sys backend (r2?)
  - add libusb0.sys to the backend [DONE (Graeme Gill): 2010.03.09]
  - break down libusb transactions for the 64 KB limit
  - transaction cancellation issue in free_fd
  - support concurrent access to same endpoint from multiple threads
o poll abstraction
o auto-claiming interface for control transfers if none available [DONE: 2010.01.08]
o drop the DDK requirement [DONE: 2010.01.20]
o trace the query for HID input reports on Linux [NO LONGER NEEDED: 2010.02.11]
o use CancelIoEx where available [DONE: 2010.02.03]
o partially emulate CancelIoEx for XP and earlier [DONE: 2010.03.15]
o use overlapped Event in pipe/read/write [DONE: 2010.03.17]
o toggable debug logging [DONE: 2010.04.06]
o split windows_usb.c into main + backend files?
o improved xusb 
  - less amateurish output [DONE: 2010.01.27]
  - vid/pid specification as args [DONE: 2010.01.28]
  - more generic HID [DONE: 2010.02.06]
  - default help and allow vid:pid single arg for strings only report [DONE: 2010.03.08]
  - debug option and improved arg handling [DONE: 2010.04.06]
  - add output report test to HID and allow endpoint selection
  - threaded xusb
o hotplug (r2?)
o use usbi list functions for our hcd chained list [NOT WORTH IT: 2010.02.16]
o Win2k support? (Not from me!)
o use internal timer functions (CreateWaitableTimer) and switch USBI_OS_HANDLES_TIMEOUT on
o HID collection selection? (re "the never ending multiple interfaces handling")
o handle rogue/ghost WinUSB drivers issue (set_device_paths vs hub enumeration) with a more explicit warning and advice
o switch to using cmake? [UNLIKELY as requires make replacement for end users]
o remove dependency on ole32 and setupapi lib

[POST-RELEASE]
o add #pragma comment( lib, "setupapi.lib" ) etc in xusb, as suggested by Tim Roberts

[BUGFIXES]
o deviceless external hub random failure on descriptors. Is there anything we can do?
  => trace what's happening on the bus
o SetupDI### call enumerates composite devices at the root ("usbccgp") rather than the leaves ("WinUSB") 
  => trying to obtain the FULL path (i.e. path that works with CreateFile) of the WinUSB leaves of a composite device handled by usbccgp is an absolute nightmare! 
     For now, just replace the composite driver with a WinUSB one. Install is a pain (must force upgrade), but it works. ["FIXED": 2009.12.16]
o Well, above doesn't work for interface selection through WinUsb_GetAssociatedInterface (what the ???)
  => back to the (more versatile) separate MI_## for composite devices' interfaces ["RE-FIXED": 2009.12.17]
o poll says control fd overlapped IO complete [FIXED with a "poll we can believe in": 2009.12.22]
o bad composite device detection when device and hub have same port number [FIXED 2009.12.23: Don't use sizeof when you mean strlen!]
o use of ControlSet001 instead of CurrentControlSet[FIXED 2009.12.26]
o incorrect function on force_hcd_device_descriptor on XP [FIXED 2009.12.26: misplaced _EX]
o Location Information on XP does NOT return location information! [WORKAROUND: 2009.12.30]
o everlasting wait on devices that have gone to sleep? / timeouts don't work [FIXED: 2010.01.07]
o reset of Mass Storage devices sure doesn't seem to work as expected... [IT DOES when you don't forget the CSW query: 2010.01.07]
o crashes in pthreadGC2.dll when poll is unhappy about an fd [FIXED: 2010.01.07]
o doesn't use the default pthread-win32 library name on MinGW [FIXED: 2010.01.11]
o the infamous device with serial => no port# issue on XP [FIXED: 2010.01.12]
o 'CM_GETIDLIST_FILTER_BITS' macro redefinition error in cfgmgr32.h for Windows 7 and other DDK issues [FIXED: 2010.01.13]
o project doesn't open in VS 2005 [FIXED (with files created by Orin Eman): 2010.01.18]
o MinGW/cygwin produce a "warning: undefined symbols not allowed" [FIXED: 2010.01.18]
o dpfp warnings during autogen (MinGW/cygwin)
o "WARNING: unrecognized options: --enable-maintainer-mode" during autogen (MinGW/cygwin)
o current warning set does not pick signed <-> unsigned conversions [FIXED (DDK build will pick 'em): 2010.01.20]
o SPDRP_SERVICE sure doesn't work for MI_## members of HID composite devices. And of course "DeviceInterfaceGUIDs" doesn't apply to HID composite either. [FIXED using HID IF GUID: 2010.01.20]
o Should "usbaudio" devices be picked as HID? How many more non-pickable GUIDs should we add? [pointless, since we can't handle audio as HID => DROPPED: 2010.01.21]
o libusb-win32's _hid_get_string_descriptor is missing the 2 byte header [FIXED: 2010.01.20]
o Xiaofan's "linker path does not have real file for library" error on MinGW [was a [http://lists.cairographics.org/archives/cairo/2009-July/017686.html libtool issue] FIXED: 2010.01.24]
o cancelling transfers after a timeout leads to an infinite wait on the remaining fds (is this an issue in core?) [yup. FIXED: 2010.01.22]
o repeated "[libusb_get_next_timeout] first timeout already expired" messages on timeout cancellation [FIXED (Michael Plante): 2010.01.24]
o broken Linux version due to missing handle_timeouts_locked [FIXED: 2010.01.24]
o Mass Storage test in xusb is broken in many places [FIXED (Alan Stern): 2010.01.30]
o the compatibility layer's poll() conflicts with cygwin's poll() [FIXED: 2010.01.28]
o _beginthreadex is not available on cygiwn [FIXED (fallback to CreateThread): 2010.01.30]
o <7 bytes HID items packets are being rejected [FIXED: 2010.02.07]
o unable to select WinUSB interface > 0 for non composite devices [FIXED (Dave C.): 2010.01.06]
o 2 bytes control transfers fail when using HidD_GetInputReport ("a device attached to the system is not functioning") [DROPPED: 2010.02.11]
  likely to be due to http://msdn.microsoft.com/en-us/library/ms789883.aspx: 
  "In addition, some devices might not support HidD_GetInputReport, and will become unresponsive if this routine is used." 
o HID overflows on first control report [FIXED: 2010.02.10]
o Xiaofan and others issues with HID (PICKit2, etc.) [FIXED: 2010.02.16]
o memory leaks in poll and set_composite (Francesco Montorsi) [FIXED: 2010.02.09]
o claim_interface crashes libusb w/ MinGW (Jere Knaappila) [DROPPED (was a pthread-win32 install issue): 2010.02.11]
o cancel_transfer, free_transfer and mutexes (Jere Knaappila) [FIXED: 2010.02.17]
o is HID getfeature really working? No it wasn't, and still isn't! [NOW FIXED: 2010.02.23]
o parent of a reused device might change during re-enumeration. [FIXED: 2010.02.18]
o backend will crash when trying to open an uninitialized device. [FIXED: 2010.02.19]
o error and warning messages don't seem to pop out when debug is disabled
o cygwin shouldn't use threads_windows.c [FIXED: 2010.02.24]
o libusb .NET reports an issue with threads [FIXED (C# and C use different calling conventions - Travis Robinson): 2010.02.25]
o fallout from the above: DDK and MSVC use different calling conventions ["FIXED" (forced stdcall conv for DLL in MSVC): 2010.03.08]
o libusb_handle_events_timeout does not poll new transactions (Jere Knaappila) [FIXED: 2010.03.02]
o "[_hid_get_feature] error Windows error code 4294967291" error with the new getfeature code for HID devices without feature reports [FIXED: 2010.02.25]
o these "program assertion failed - WinUSB interface 0 found at position 1" messages (Jere, Xiaofan)
o Xiaofan's issue with libtool [PROPERLY FIXED (force locale to C always in libtool): 2010.03.08]
o cached devices shouldn't be unref'd in enumerate (Travis Robinson) [FIXED: 2010.03.04]
o resource.h is bothersome - can we remove it? [YES WE CAN: 2010.03.06]
o overwhelming timeout polling with multiple threads (Graeme Gill) [FIXED (Graeme Gill): 2010.03.11]
o driver installer double warning [FIXED: 2010.03.11]
o despite driver installation success, device is still listed driverless [FIXED: 2010.03.12]
o ERROR_OPERATION_ABORTED when thread is cancelled before control pipe is read (Graeme Gill) [FIXED: 2010.03.17]
o cancel_io "Unable to cancel I/O that was started from another thread" on XP when running xusb [FIXED: 2010.03.19]
o MSVC debug mode and CloseHandle() for the pipe overlapped event. [FIXED: 2010.03.19]
o the new fake pipe event appears to be creating a race condition in usbi_fd_notification (Travis Robinson) [FIXED: 2010.03.21]
o "could not duplicate handle for CancelIo - using original one" in multithreaded app on XP (Travis Robinson) [FIXED: 2010.03.22]
o double removal of wfd can result in newely allocated wfd being freed (Travis Robinson) [FIXED: 2010.03.22]
o init returns -99 if WinUSB.dll is not present (Kenichi Cui) [FIXED: 2010.04.01]
o HID and Feature Reports (Axel Rohde) - cannot use DEVICE [FIXED: 2010.04.06]
o HID and Feature Reports (Axel Rohde) - bad report lengths in xusb [FIXED: 2010.04.07]
o HID and Feature Reports (Axel Rohde) - first byte eaten when report IDs are in use
o [wdi] "Warning: .stabs: description field too big, try a different debug format" on MinGW-32 [FIXED (disable -g): 2010.03.24]
o [wdi] pipe communications between installer and lib don't seem to work with MinGW [FIXED (DON'T PICK EXE from dir, use the one in .libs!!!): 2010.03.23]
o [wdi] "(3) System does not work under WOW64 and requires 64-bit version." when running 32 bit installer [NOTHING WE CAN DO: MUST HAVE 64 BIT EXE EMBEDDED!]
o [wdi] "sh: Bad file number" [FIXED (more UAC disputable choices): 2010.03.24]
o [wdi] "gcc.exe: -lusb-1.0: linker input file unused because linking not done" [FIXED: 2010.03.24]
o [wdi] DifXAPI.dll must be provided on XP [DROPPED: 2010.03.28]
o [wdi] ShellExecuteEx w/ runas is not very XP friendly [FIXED (Use CreateProcess): 2010.03.25]
o [wdi] default proposed user for XP does not seem to have sufficient privileges for install [NAH, see below]
o [wdi] if XP user chooses "protect my computer and data from unauthorized program activity" on the installer, ShellExecuteEx never returns! [FIXED (CreateProcess): 2010.03.25]
o [wdi] "Unable to get the OEM Inf for device ROOTLEGACY_######" info messages from DifX on XP [FIXED (don't use DifX): 2010.03.28]
o [wdi] final installation does not seem to launch if cached oem already exists for device on XP. Can DifX be more forceful about that? [FIXED (don't use DifX): 2010.03.28]
o [wdi] cygwin with -mno-cygwin produces a "warning: passing arg 2 of `execv' from incompatible pointer type" with the embedder [FIXED: 2010.03.26]
o [wdi] test app compiled in a Win7 Free DDK build environment doesn't run on XP [FIXED (added warning): 2010.03.30]
o [wdi] Windows fails to find the driver file when device is plugged in after SetupCopyOEMInf is used [FIXED (don't use SPOST_NONE!): 2010.03.29]
o [wdi] The above going to be a problem if the files are removed before the device is plugged back in. Should we add DriverPackagePreinstall (and DifXAPI) back again or just warn the user?
o [wdi-gui] why do these all these control look SO UGLY compared to what MSVC promises?
o [wdi-gui] bad placement of controls wrt device dropdown
o [wdi-gui] application goes away on UAC
o [wdi-gui] I've seen the application crash when playing with the checboxes (before Windows decided to force compatibility mode)
o [wdi-gui] that "make[2]: Circular setdrv_gui.rc <- setdrv_gui.rc.o dependency dropped." with MinGW
o [wdi-gui] driverless devices only show in driverless mode
o [wdi-gui] log is cleared during installation because of device events / likely issue of popup if edit mode
o [wdi-gui] cannot copy from log/info box
o [wdi] Why doesn't UAC auto elevation work when I rename setdrv to setup any more? [Installer detection only applies to 32 bit apps!!:
        see http://msdn.microsoft.com/en-us/library/bb530410.aspx#vistauac_topic3]

[WINDOWS DRIVER INSTALLER (WDI)]
o detect driverless devices [DONE]
o generate basic inf [DONE]
o embed CoInstaller files within library [DONE]
o check validity of generated inf with DDK's Chkinf [DONE: 2010.03.08]
o escalate to admin rights for install:
  - create yet another separate installer exe and run it as priviledged [DONE: 2010.03.10]
  - communication between installer exe and installer lib [DONE (named pipe): 2010.03.11]
  - force reenumeration of devices with new driver in driver-installer [DONE: 2010.03.12]
  - embed/extract installer exe into lib [DONE: 2010.03.15]
  - add rc/res description to installer exe for UAC warning [doesn't help but DONE: 2010.03.15]
  - add status to communication process
o add selective 64 bit installer exe selection to prevent compat warning on 64 bit [DONE: 2010.03.16]
o Windows 7 device description retrieval (pfew!) [DONE: 2010.03.16]
o is there a way to force library functions to be embedded in exe always, or do we have to add res manually?
  - alright, MS's handling and linking of resources is useless - write our own resource handler [DONE: 2010.03.23]
o separate driver-installer into a libusb-compat type project [DONE: 2010.03.23]
o add MinGW/cygwin support:
  - basic autotool support [DONE: 2010.03.23]
  - add the resource step + cleanup [DONE: 2010.03.23]
  - add 32/64 bit capability detection [DONE: 2010.03.24]
  - add coinstaller DLL detection [DONE: 2010.03.25]
  - DDK directory from configure [DONE: 2010.03.25]
  - is it possible to get both 32 and 64 compiled with MinGW-w64? [YES, using WPG-System64: 2010.03.24]
  - force production of 32 bit library on 64 bit systems, for compatibility [DONE: 2010.03.26]
  - add warnings if compiler can only produce 32 or 64 [DONE: 2010.03.26]
  - prevent embedding of resources that won't be needed [DONE: 2010.03.26]
  - force resource step on installer.exe changes [DONE: 2010.04.02]
o enable list that includes devices that already have a driver [DONE: 2010.03.26]
o improve test application
  - ask for confirmation before installing driver [DONE: 2010.03.26]
  - allow for device name editing + check for null display name
  - auto add MI# to given name for composite [DONE: 2010.03.26]
o detect "reject unsigned drivers" (ERROR_NO_CATALOG_FOR_OEM_INF) on XP, and advise users on how to disable that option (http://articles.techrepublic.com.com/5100-10878_11-5875443.html)
o prevent reentrant calls to libwdi
o add init/exit call [NO LONGER NEEDED: 2010.04.12]
o return WDI error codes on WDI functions [DONE: 2010.04.12]
o make wdi_install_driver async/threaded with pipe for messaging (is it worth it without DifXAPI?) [NOPE: 2010.04.12]
o test on Vista/XP [XP: OK]
o add a timeout for communications between installer/libwdi [DONE: 2010.03.25]
o detect if another installer is running [DONE: 2010.03.28]
o remove DifX dependency [DONE: 2010.03.28]
o detect phantom devices [DONE: 2010.03.29]
o add DLL output project in MSVC
o allow the use a remote driver files
o DDK sources support
  - how do you force static? [TARGETTYPE=LIBRARY: 2010.03.29]
  - again, is it possible to get both 32 and 64 bit compiled at once? [YES: 2010.03.26]
  - pick up DDK path from shell [DONE: 2010.03.30]
o Windows logging facility [DONE: 2010.04.02]
o detect elevated installer/user on UAC platforms and use CreateProcess to prevent unnecessary UAC prompt [DONE: 2010.04.02]
o use manifest to force UAC elevation of sample program [DONE (for MSVC and DDK): 2010.04.02]
o better status
o GUI app
  - DDK/MinGW/MSVC compat [DONE: 2010.03.30]
  - Editable description [DONE: 2010.03.31]
  - hotplug detection & reenumeration [DONE: 2010.04.01]
  - create new [UNTESTED: 2010.04.01]
  - log output to dropdown [DONE: 2010.04.02]
  - browser control for folder selection (this IS going to be a massive pain!)
  - improve UI
  - application icon/about/info/etc
  - colours in log dropdown according to level?
  - basic/advanced mode
  - allow the provision of an inf/conf file
o add DLL info
o remove context in logging facility / alternative to context?
o add/display MS redist license
o post install cleanup
o enable the use of installer.exe as a standalone with args from cmdline instead of pipe?
o better embedder with files specified on commandline
o provide DDK redist binaries for those who don't want to download the whole lot
o existing driver removal/replacement?
o hook into %WINDOWS%SetupAPI/setupact.log to provide real-time update of the installation process?