From 9194f49c8495aae1ba864f1f864e8d1ecb530c50 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Mon, 15 Mar 2010 17:22:46 +0000 Subject: added missing driver_installer.h and other small MSVC changes --- libusb/os/driver_install.c | 8 +++++--- libusb/os/driver_installer.c | 2 +- libusb/os/driver_installer.h | 6 ++++++ 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 libusb/os/driver_installer.h (limited to 'libusb/os') diff --git a/libusb/os/driver_install.c b/libusb/os/driver_install.c index dbbfcd5..2118689 100644 --- a/libusb/os/driver_install.c +++ b/libusb/os/driver_install.c @@ -11,7 +11,7 @@ #include "libusbi.h" #include "windows_usb.h" #include "driver_install.h" -#include "driver-installer.h" +#include "driver_installer.h" #define INF_NAME "libusb-device.inf" @@ -91,7 +91,9 @@ const struct res resource[] = { {"AMD64_DLL1" , "amd64", "WdfCoInstaller01009.dl {"X86_DLL1", "x86", "WdfCoInstaller01009.dll"}, {"X86_DLL2", "x86", "winusbcoinstaller2.dll"} }; const int nb_resources = sizeof(resource)/sizeof(resource[0]); +// TODO: remove if not needed extern char* sanitize_path(const char* path); +extern char *windows_error_str(uint32_t retval); HANDLE pipe = INVALID_HANDLE_VALUE; char* req_device_id; @@ -133,7 +135,7 @@ static int init_cfgmgr32(void) struct driver_info* list_driverless(void) { unsigned i, j; - DWORD size, reg_type, install_state; + DWORD size, reg_type; CONFIGRET r; HDEVINFO dev_info; SP_DEVINFO_DATA dev_info_data; @@ -228,7 +230,7 @@ struct driver_info* list_driverless(void) cur = drv_info; // sanitized path should NOT be used as device id - drv_info->device_id = strdup(path); + drv_info->device_id = _strdup(path); safe_strcpy(drv_info->desc, sizeof(drv_info->desc), desc); diff --git a/libusb/os/driver_installer.c b/libusb/os/driver_installer.c index 5b66b48..c2d1720 100644 --- a/libusb/os/driver_installer.c +++ b/libusb/os/driver_installer.c @@ -13,7 +13,7 @@ #include #include #include -#include "driver-installer.h" +#include "driver_installer.h" /* * API macros - from libusb-win32 1.x diff --git a/libusb/os/driver_installer.h b/libusb/os/driver_installer.h new file mode 100644 index 0000000..5eb95fa --- /dev/null +++ b/libusb/os/driver_installer.h @@ -0,0 +1,6 @@ +#pragma once + +enum installer_code { + IC_PRINT_MESSAGE, + IC_GET_DEVICE_ID, +}; \ No newline at end of file -- cgit v1.2.1