diff --git a/msvc/libdivecomputer.vcproj b/msvc/libdivecomputer.vcproj
index 0505056..95b9b84 100644
--- a/msvc/libdivecomputer.vcproj
+++ b/msvc/libdivecomputer.vcproj
@@ -246,6 +246,10 @@
RelativePath="..\src\hw_ostc_parser.c"
>
+
+
@@ -422,6 +426,10 @@
RelativePath="..\src\uwatec_memomouse_parser.c"
>
+
+
@@ -516,6 +524,10 @@
RelativePath="..\include\libdivecomputer\hw_ostc3.h"
>
+
+
@@ -664,6 +676,10 @@
RelativePath="..\include\libdivecomputer\uwatec_memomouse.h"
>
+
+
diff --git a/src/ihex.c b/src/ihex.c
index 5389696..559e4b4 100644
--- a/src/ihex.c
+++ b/src/ihex.c
@@ -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;
diff --git a/src/serial_win32.c b/src/serial_win32.c
index cef0704..31b7368 100644
--- a/src/serial_win32.c
+++ b/src/serial_win32.c
@@ -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;