summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Batard <pbatard@gmail.com>2010-10-26 11:39:38 +0100
committerPete Batard <pbatard@gmail.com>2010-10-26 11:39:38 +0100
commitd9a0a98addd5e6f74238dc68514f6765652ceeee (patch)
tree17525623460c4542a305c2fdbd507b45ca74d90f
parent08aef0b40eda436b4748648e448cc0da843f0ab2 (diff)
downloadlibusb-d9a0a98addd5e6f74238dc68514f6765652ceeee.tar.gz
switched MSVC project files from MBCS to Unicode
* MBCS (which is different from UTF-8) only makes sense if supporting Windows 95/98, which we don't * also switched all string functions to use char*
-rw-r--r--examples/lsusb.vcproj4
-rw-r--r--examples/lsusb_2008.vcproj8
-rw-r--r--examples/xusb.vcproj8
-rw-r--r--examples/xusb_2008.vcproj8
-rw-r--r--libusb/os/poll_windows.c2
-rw-r--r--libusb/os/windows_usb.c20
-rw-r--r--libusb/os/windows_usb.h4
-rw-r--r--libusb_dll.vcproj8
-rw-r--r--libusb_dll_2008.vcproj8
-rw-r--r--libusb_static.vcproj8
-rw-r--r--libusb_static_2008.vcproj8
11 files changed, 43 insertions, 43 deletions
diff --git a/examples/lsusb.vcproj b/examples/lsusb.vcproj
index dcc0666..3f9bc19 100644
--- a/examples/lsusb.vcproj
+++ b/examples/lsusb.vcproj
@@ -23,7 +23,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)"
ConfigurationType="1"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -179,7 +179,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
diff --git a/examples/lsusb_2008.vcproj b/examples/lsusb_2008.vcproj
index d841dd0..0313226 100644
--- a/examples/lsusb_2008.vcproj
+++ b/examples/lsusb_2008.vcproj
@@ -24,7 +24,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)"
ConfigurationType="1"
- CharacterSet="2"
+ CharacterSet="1"
BuildLogFile="$(IntDir)\$(ProjectName).htm"
>
<Tool
@@ -96,7 +96,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)"
ConfigurationType="1"
- CharacterSet="2"
+ CharacterSet="1"
BuildLogFile="$(IntDir)\$(ProjectName).htm"
>
<Tool
@@ -169,7 +169,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)"
ConfigurationType="1"
- CharacterSet="2"
+ CharacterSet="1"
WholeProgramOptimization="1"
BuildLogFile="$(IntDir)\$(ProjectName).htm"
>
@@ -239,7 +239,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)"
ConfigurationType="1"
- CharacterSet="2"
+ CharacterSet="1"
WholeProgramOptimization="1"
BuildLogFile="$(IntDir)\$(ProjectName).htm"
>
diff --git a/examples/xusb.vcproj b/examples/xusb.vcproj
index 52d93c8..bf2d801 100644
--- a/examples/xusb.vcproj
+++ b/examples/xusb.vcproj
@@ -23,7 +23,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)"
ConfigurationType="1"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -101,7 +101,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)"
ConfigurationType="1"
- CharacterSet="2"
+ CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
@@ -179,7 +179,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -258,7 +258,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
- CharacterSet="2"
+ CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
diff --git a/examples/xusb_2008.vcproj b/examples/xusb_2008.vcproj
index 0430c1f..270c2da 100644
--- a/examples/xusb_2008.vcproj
+++ b/examples/xusb_2008.vcproj
@@ -24,7 +24,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)"
ConfigurationType="1"
- CharacterSet="2"
+ CharacterSet="1"
BuildLogFile="$(IntDir)\$(ProjectName).htm"
>
<Tool
@@ -96,7 +96,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)"
ConfigurationType="1"
- CharacterSet="2"
+ CharacterSet="1"
BuildLogFile="$(IntDir)\$(ProjectName).htm"
>
<Tool
@@ -169,7 +169,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)"
ConfigurationType="1"
- CharacterSet="2"
+ CharacterSet="1"
WholeProgramOptimization="1"
BuildLogFile="$(IntDir)\$(ProjectName).htm"
>
@@ -238,7 +238,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\examples\$(ProjectName)"
ConfigurationType="1"
- CharacterSet="2"
+ CharacterSet="1"
WholeProgramOptimization="1"
BuildLogFile="$(IntDir)\$(ProjectName).htm"
>
diff --git a/libusb/os/poll_windows.c b/libusb/os/poll_windows.c
index 370d61e..3657be5 100644
--- a/libusb/os/poll_windows.c
+++ b/libusb/os/poll_windows.c
@@ -169,7 +169,7 @@ void init_polling(void)
}
if (!is_polling_set) {
pCancelIoEx = (BOOL (__stdcall *)(HANDLE,LPOVERLAPPED))
- GetProcAddress(GetModuleHandle("KERNEL32"), "CancelIoEx");
+ GetProcAddress(GetModuleHandleA("KERNEL32"), "CancelIoEx");
usbi_dbg("Will use CancelIo%s for I/O cancellation",
CancelIoEx_Available?"Ex":"");
for (i=0; i<MAX_FDS; i++) {
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c
index c6e1456..1ed72d4 100644
--- a/libusb/os/windows_usb.c
+++ b/libusb/os/windows_usb.c
@@ -195,7 +195,7 @@ static char err_string[ERR_BUFFER_SIZE];
safe_sprintf(err_string, ERR_BUFFER_SIZE, "[%d] ", error_code);
size = FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, error_code,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &err_string[safe_strlen(err_string)],
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), &err_string[safe_strlen(err_string)],
ERR_BUFFER_SIZE - (DWORD)safe_strlen(err_string), NULL);
if (size == 0) {
format_error = GetLastError();
@@ -286,7 +286,7 @@ bool get_devinfo_data(struct libusb_context *ctx,
HDEVINFO *dev_info, SP_DEVINFO_DATA *dev_info_data, unsigned _index)
{
if (_index <= 0) {
- *dev_info = SetupDiGetClassDevs(NULL, "USB", NULL, DIGCF_PRESENT|DIGCF_ALLCLASSES);
+ *dev_info = SetupDiGetClassDevsA(NULL, "USB", NULL, DIGCF_PRESENT|DIGCF_ALLCLASSES);
if (*dev_info == INVALID_HANDLE_VALUE) {
return false;
}
@@ -318,11 +318,11 @@ bool get_devinfo_data(struct libusb_context *ctx,
* structure returned and call this function repeatedly using the same guid (with an
* incremented index starting at zero) until all interfaces have been returned.
*/
-SP_DEVICE_INTERFACE_DETAIL_DATA *get_interface_details(struct libusb_context *ctx,
+SP_DEVICE_INTERFACE_DETAIL_DATA_A *get_interface_details(struct libusb_context *ctx,
HDEVINFO *dev_info, SP_DEVINFO_DATA *dev_info_data, const GUID* guid, unsigned _index)
{
SP_DEVICE_INTERFACE_DATA dev_interface_data;
- SP_DEVICE_INTERFACE_DETAIL_DATA *dev_interface_details = NULL;
+ SP_DEVICE_INTERFACE_DETAIL_DATA_A *dev_interface_details = NULL;
DWORD size;
if (_index <= 0) {
@@ -372,7 +372,7 @@ SP_DEVICE_INTERFACE_DETAIL_DATA *get_interface_details(struct libusb_context *ct
}
dev_interface_details->cbSize = sizeof(SP_DEVICE_INTERFACE_DETAIL_DATA);
- if (!SetupDiGetDeviceInterfaceDetail(*dev_info, &dev_interface_data,
+ if (!SetupDiGetDeviceInterfaceDetailA(*dev_info, &dev_interface_data,
dev_interface_details, size, &size, NULL)) {
usbi_err(ctx, "could not access interface data (actual) for index %u: %s",
_index, windows_error_str(0));
@@ -772,10 +772,10 @@ static int windows_init(struct libusb_context *ctx)
int i, r = LIBUSB_ERROR_OTHER;
OSVERSIONINFO os_version;
HANDLE semaphore;
- TCHAR sem_name[11+1+8]; // strlen(libusb_init)+'\0'+(32-bit hex PID)
+ char sem_name[11+1+8]; // strlen(libusb_init)+'\0'+(32-bit hex PID)
sprintf(sem_name, "libusb_init%08X", (unsigned int)GetCurrentProcessId()&0xFFFFFFFF);
- semaphore = CreateSemaphore(NULL, 1, 1, sem_name);
+ semaphore = CreateSemaphoreA(NULL, 1, 1, sem_name);
if (semaphore == NULL) {
usbi_err(ctx, "could not create semaphore: %s", windows_error_str(0));
return LIBUSB_ERROR_NO_MEM;
@@ -1240,7 +1240,7 @@ static int windows_get_device_list(struct libusb_context *ctx, struct discovered
struct discovered_devs *discdevs = *_discdevs;
HDEVINFO dev_info;
SP_DEVINFO_DATA dev_info_data;
- SP_DEVICE_INTERFACE_DETAIL_DATA *dev_interface_details = NULL;
+ SP_DEVICE_INTERFACE_DETAIL_DATA_A *dev_interface_details = NULL;
GUID hid_guid;
#define MAX_ENUM_GUIDS 64
const GUID* guid[MAX_ENUM_GUIDS];
@@ -1584,10 +1584,10 @@ static void windows_exit(void)
{
int i;
HANDLE semaphore;
- TCHAR sem_name[11+1+8]; // strlen(libusb_init)+'\0'+(32-bit hex PID)
+ char sem_name[11+1+8]; // strlen(libusb_init)+'\0'+(32-bit hex PID)
sprintf(sem_name, "libusb_init%08X", (unsigned int)GetCurrentProcessId()&0xFFFFFFFF);
- semaphore = CreateSemaphore(NULL, 1, 1, sem_name);
+ semaphore = CreateSemaphoreA(NULL, 1, 1, sem_name);
if (semaphore == NULL) {
return;
}
diff --git a/libusb/os/windows_usb.h b/libusb/os/windows_usb.h
index 2de40dd..8d62f9f 100644
--- a/libusb/os/windows_usb.h
+++ b/libusb/os/windows_usb.h
@@ -332,9 +332,9 @@ struct driver_lookup {
#define DLL_LOAD(dll, name, ret_on_failure) \
do { \
- HMODULE h = GetModuleHandle(#dll); \
+ HMODULE h = GetModuleHandleA(#dll); \
if (!h) \
- h = LoadLibrary(#dll); \
+ h = LoadLibraryA(#dll); \
if (!h) { \
if (ret_on_failure) { return LIBUSB_ERROR_NOT_FOUND; }\
else { break; } \
diff --git a/libusb_dll.vcproj b/libusb_dll.vcproj
index 5c3f712..4bfa498 100644
--- a/libusb_dll.vcproj
+++ b/libusb_dll.vcproj
@@ -23,7 +23,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll\libusb-1.0"
ConfigurationType="2"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -102,7 +102,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll\libusb-1.0"
ConfigurationType="2"
- CharacterSet="2"
+ CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
@@ -181,7 +181,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -261,7 +261,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
- CharacterSet="2"
+ CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
diff --git a/libusb_dll_2008.vcproj b/libusb_dll_2008.vcproj
index 735c282..40aa057 100644
--- a/libusb_dll_2008.vcproj
+++ b/libusb_dll_2008.vcproj
@@ -23,7 +23,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll\libusb-1.0"
ConfigurationType="2"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -93,7 +93,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll\libusb-1.0"
ConfigurationType="2"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -164,7 +164,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll\libusb-1.0"
ConfigurationType="2"
- CharacterSet="2"
+ CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
@@ -232,7 +232,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\dll\libusb-1.0"
ConfigurationType="2"
- CharacterSet="2"
+ CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
diff --git a/libusb_static.vcproj b/libusb_static.vcproj
index 51fdcc0..8a60ac3 100644
--- a/libusb_static.vcproj
+++ b/libusb_static.vcproj
@@ -23,7 +23,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib\libusb-1.0"
ConfigurationType="4"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -87,7 +87,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib\libusb-1.0"
ConfigurationType="4"
- CharacterSet="2"
+ CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
@@ -149,7 +149,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -214,7 +214,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
- CharacterSet="2"
+ CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
diff --git a/libusb_static_2008.vcproj b/libusb_static_2008.vcproj
index cfbaba6..8541676 100644
--- a/libusb_static_2008.vcproj
+++ b/libusb_static_2008.vcproj
@@ -23,7 +23,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib\libusb-1.0"
ConfigurationType="4"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -83,7 +83,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib\libusb-1.0"
ConfigurationType="4"
- CharacterSet="2"
+ CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
@@ -144,7 +144,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib\libusb-1.0"
ConfigurationType="4"
- CharacterSet="2"
+ CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
@@ -203,7 +203,7 @@
OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib"
IntermediateDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\lib\libusb-1.0"
ConfigurationType="4"
- CharacterSet="2"
+ CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool