Merge branch 'msvc'
This commit is contained in:
commit
f219de5a55
@ -246,6 +246,10 @@
|
||||
RelativePath="..\src\hw_ostc_parser.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\ihex.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\irda.c"
|
||||
>
|
||||
@ -422,6 +426,10 @@
|
||||
RelativePath="..\src\uwatec_memomouse_parser.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\uwatec_meridian.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\uwatec_smart.c"
|
||||
>
|
||||
@ -516,6 +524,10 @@
|
||||
RelativePath="..\include\libdivecomputer\hw_ostc3.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\ihex.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\irda.h"
|
||||
>
|
||||
@ -664,6 +676,10 @@
|
||||
RelativePath="..\include\libdivecomputer\uwatec_memomouse.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\libdivecomputer\uwatec_meridian.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\include\libdivecomputer\uwatec_smart.h"
|
||||
>
|
||||
|
||||
@ -44,7 +44,7 @@ dc_ihex_file_open (dc_ihex_file_t **result, dc_context_t *context, const char *f
|
||||
return DC_STATUS_INVALIDARGS;
|
||||
}
|
||||
|
||||
file = malloc (sizeof (dc_ihex_file_t));
|
||||
file = (dc_ihex_file_t *) malloc (sizeof (dc_ihex_file_t));
|
||||
if (file == NULL) {
|
||||
ERROR (context, "Failed to allocate memory.");
|
||||
return DC_STATUS_NOMEMORY;
|
||||
|
||||
@ -52,7 +52,7 @@ serial_enumerate (serial_callback_t callback, void *userdata)
|
||||
{
|
||||
// Open the registry key.
|
||||
HKEY hKey;
|
||||
LONG rc = RegOpenKeyEx (HKEY_LOCAL_MACHINE, "HARDWARE\\DEVICEMAP\\SERIALCOMM", 0, KEY_QUERY_VALUE, &hKey);
|
||||
LONG rc = RegOpenKeyExA (HKEY_LOCAL_MACHINE, "HARDWARE\\DEVICEMAP\\SERIALCOMM", 0, KEY_QUERY_VALUE, &hKey);
|
||||
if (rc != ERROR_SUCCESS) {
|
||||
if (rc == ERROR_FILE_NOT_FOUND)
|
||||
return 0;
|
||||
@ -74,7 +74,7 @@ serial_enumerate (serial_callback_t callback, void *userdata)
|
||||
DWORD name_len = sizeof (name);
|
||||
DWORD data_len = sizeof (data);
|
||||
DWORD type = 0;
|
||||
rc = RegEnumValue (hKey, i, name, &name_len, NULL, &type, (LPBYTE) data, &data_len);
|
||||
rc = RegEnumValueA (hKey, i, name, &name_len, NULL, &type, (LPBYTE) data, &data_len);
|
||||
if (rc != ERROR_SUCCESS) {
|
||||
RegCloseKey(hKey);
|
||||
return -1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user