diff --git a/src/Cedar/BridgeWin32.c b/src/Cedar/BridgeWin32.c index 2941ae81..ea859ca7 100644 --- a/src/Cedar/BridgeWin32.c +++ b/src/Cedar/BridgeWin32.c @@ -1406,7 +1406,7 @@ LIST *GetEthAdapterListInternal() { LIST *o; LIST *ret; - UINT size; + ULONG size; char *buf; UINT i, j; char *qos_tag = "(Microsoft's Packet Scheduler)"; // Allow to combine "FriendlyName" consisting of a NULL character and QOS tag. diff --git a/src/Cedar/Proto_Win7.c b/src/Cedar/Proto_Win7.c index 98397503..faad5175 100644 --- a/src/Cedar/Proto_Win7.c +++ b/src/Cedar/Proto_Win7.c @@ -127,7 +127,7 @@ void IPsecWin7UpdateHostIPAddressList(IPSEC_WIN7 *w) LIST *o; UINT i; BUF *buf; - UINT retsize; + DWORD retsize; // Validate arguments if (w == NULL) { diff --git a/src/Cedar/SeLowUser.c b/src/Cedar/SeLowUser.c index 1074adf9..6756761c 100644 --- a/src/Cedar/SeLowUser.c +++ b/src/Cedar/SeLowUser.c @@ -632,7 +632,7 @@ SU_ADAPTER *SuOpenAdapter(SU *u, char *adapter_id) void *h; SU_ADAPTER *a; SL_IOCTL_EVENT_NAME t; - UINT read_size; + DWORD read_size; // Validate arguments if (u == NULL || adapter_id == NULL) { @@ -690,7 +690,7 @@ SU_ADAPTER *SuOpenAdapter(SU *u, char *adapter_id) TOKEN_LIST *SuEnumAdapters(SU *u) { UINT i; - UINT ret_size; + DWORD ret_size; TOKEN_LIST *ret; // Validate arguments if (u == NULL) @@ -730,7 +730,7 @@ TOKEN_LIST *SuEnumAdapters(SU *u) LIST *SuGetAdapterList(SU *u) { LIST *ret; - UINT read_size; + DWORD read_size; UINT i; // Validate arguments if (u == NULL) @@ -893,7 +893,7 @@ SU *SuInitEx(UINT wait_for_bind_complete_tick) { void *h; SU *u; - UINT read_size; + DWORD read_size; bool flag = false; UINT64 giveup_tick = 0; static bool flag2 = false; // flag2 must be global diff --git a/src/Cedar/WinUi.c b/src/Cedar/WinUi.c index 8b1de535..c266f90b 100644 --- a/src/Cedar/WinUi.c +++ b/src/Cedar/WinUi.c @@ -964,7 +964,7 @@ void *CreateWizardPageInstance(WIZARD *w, WIZARD_PAGE *p) t.lParam = (LPARAM)p->DialogParam; - return CreatePropertySheetPageW(&t); + return CreatePropertySheetPageW((LPCPROPSHEETPAGEW)&t); } // Create a new wizard @@ -2368,7 +2368,7 @@ void AdjustWindowAndControlSize(HWND hWnd, bool *need_resize, double *factor_x, *need_resize = true; // Get the font of the current window - hDlgFont = (HFONT)SendMsg(hWnd, 0, WM_GETFONT, 0, 0); + hDlgFont = (HFONT)SendMessageW(hWnd, WM_GETFONT, 0, 0); // Get the width and height of the font of the current window CalcFontSize(hDlgFont, &dlgfont_x, &dlgfont_y); @@ -2677,7 +2677,7 @@ HBITMAP ResizeBitmap(HBITMAP hSrc, UINT src_x, UINT src_y, UINT dst_x, UINT dst_ // Copy once the transfer source Zero(&bi, sizeof(bi)); Copy(&bi.bmiHeader, &h, sizeof(BITMAPINFOHEADER)); - srcHbitMap = CreateDIBSection(hMemDC, &bi, DIB_RGB_COLORS, &srcData, NULL, 0); + srcHbitMap = CreateDIBSection(hMemDC, &bi, DIB_RGB_COLORS, (void **)&srcData, NULL, 0); hOld = SelectObject(hMemDC, srcHbitMap); @@ -2695,7 +2695,7 @@ HBITMAP ResizeBitmap(HBITMAP hSrc, UINT src_x, UINT src_y, UINT dst_x, UINT dst_ Zero(&bi, sizeof(bi)); Copy(&bi.bmiHeader, &h, sizeof(BITMAPINFOHEADER)); - ret = CreateDIBSection(hMemDC, &bi, DIB_RGB_COLORS, &data, NULL, 0); + ret = CreateDIBSection(hMemDC, &bi, DIB_RGB_COLORS, (void **)&data, NULL, 0); if(srcData != NULL && data != NULL) { diff --git a/src/Mayaqua/Network.c b/src/Mayaqua/Network.c index 0ea87fee..496d2dd8 100644 --- a/src/Mayaqua/Network.c +++ b/src/Mayaqua/Network.c @@ -9265,12 +9265,12 @@ bool Win32GetDnsSuffix(char *domain, UINT size) info_size = 0; info = ZeroMalloc(sizeof(IP_ADAPTER_ADDRESSES_XP)); - if (GetAdaptersAddresses(AF_INET, 0, NULL, info, &info_size) == ERROR_BUFFER_OVERFLOW) + if (GetAdaptersAddresses(AF_INET, 0, NULL, (PIP_ADAPTER_ADDRESSES)info, &info_size) == ERROR_BUFFER_OVERFLOW) { Free(info); info = ZeroMalloc(info_size); } - if (GetAdaptersAddresses(AF_INET, 0, NULL, info, &info_size) != NO_ERROR) + if (GetAdaptersAddresses(AF_INET, 0, NULL, (PIP_ADAPTER_ADDRESSES)info, &info_size) != NO_ERROR) { Free(info); return false; diff --git a/src/Mayaqua/Win32.c b/src/Mayaqua/Win32.c index 7ed778cb..b14d9cc2 100644 --- a/src/Mayaqua/Win32.c +++ b/src/Mayaqua/Win32.c @@ -195,7 +195,7 @@ void Win32InitNewThread() bool Win32SetFolderCompressW(wchar_t *path, bool compressed) { HANDLE h; - UINT retsize = 0; + DWORD retsize = 0; USHORT flag; wchar_t tmp[MAX_PATH]; // Validate arguments @@ -239,7 +239,7 @@ bool Win32SetFolderCompressW(wchar_t *path, bool compressed) bool Win32SetFolderCompress(char *path, bool compressed) { HANDLE h; - UINT retsize = 0; + DWORD retsize = 0; USHORT flag; char tmp[MAX_PATH]; // Validate arguments @@ -2822,7 +2822,7 @@ bool Win32InitThread(THREAD *t) { WIN32THREAD *w; HANDLE hThread; - DWORD thread_id; + UINT thread_id; WIN32THREADSTARTUPINFO *info; // Validate arguments if (t == NULL) @@ -3033,13 +3033,13 @@ void Win32GetSystemTime(SYSTEMTIME *system_time) // Increment of 32bit integer void Win32Inc32(UINT *value) { - InterlockedIncrement(value); + InterlockedIncrement((volatile LONG *)value); } // Decrement of 32bit integer void Win32Dec32(UINT *value) { - InterlockedDecrement(value); + InterlockedDecrement((volatile LONG *)value); } // Sleep the thread @@ -3341,7 +3341,7 @@ char *Win32InputFromFileLineA() while (true) { char c; - UINT read_size = 0; + DWORD read_size = 0; if (ReadFile(hstdin, &c, 1, &read_size, NULL) == false) {