]> sigrok.org Git - libserialport.git/commit
windows: Fix another CreateFile usage.
authorMartin Ling <redacted>
Fri, 24 Jan 2020 05:14:47 +0000 (05:14 +0000)
committerUwe Hermann <redacted>
Sun, 26 Jan 2020 20:11:46 +0000 (21:11 +0100)
commitd6412d280180ed87cb07578d5d15d09d775b9f7d
treedbf40a5a601c3caef72f3f1d2d006e1c136245ff
parent60fc49ceab499a979ba9053cce86944335ab5488
windows: Fix another CreateFile usage.

When built with MSVC with unicode enabled, this gave:

warning C4133: 'function': incompatible types - from 'char *' to 'LPCWSTR'

due to CreateFile expanding to CreateFileW which accepts UTF-16 filenames.

The device name used here is in 8-bit format, having come from a call to
wc_to_utf8() in either get_root_hub_name() or get_external_hub_name(). So
we need to use CreateFileA.
windows.c