1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2026-09-19 09:51:28 +03:00

Merge pull request #2299 from chipitsine/master

fix build errors in vs2026
This commit is contained in:
Ilya Shipitsin
2026-08-29 22:29:30 +02:00
committed by GitHub
6 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -1406,7 +1406,7 @@ LIST *GetEthAdapterListInternal()
{ {
LIST *o; LIST *o;
LIST *ret; LIST *ret;
UINT size; ULONG size;
char *buf; char *buf;
UINT i, j; UINT i, j;
char *qos_tag = "(Microsoft's Packet Scheduler)"; // Allow to combine "FriendlyName" consisting of a NULL character and QOS tag. char *qos_tag = "(Microsoft's Packet Scheduler)"; // Allow to combine "FriendlyName" consisting of a NULL character and QOS tag.
+1 -1
View File
@@ -127,7 +127,7 @@ void IPsecWin7UpdateHostIPAddressList(IPSEC_WIN7 *w)
LIST *o; LIST *o;
UINT i; UINT i;
BUF *buf; BUF *buf;
UINT retsize; DWORD retsize;
// Validate arguments // Validate arguments
if (w == NULL) if (w == NULL)
{ {
+4 -4
View File
@@ -632,7 +632,7 @@ SU_ADAPTER *SuOpenAdapter(SU *u, char *adapter_id)
void *h; void *h;
SU_ADAPTER *a; SU_ADAPTER *a;
SL_IOCTL_EVENT_NAME t; SL_IOCTL_EVENT_NAME t;
UINT read_size; DWORD read_size;
// Validate arguments // Validate arguments
if (u == NULL || adapter_id == NULL) if (u == NULL || adapter_id == NULL)
{ {
@@ -690,7 +690,7 @@ SU_ADAPTER *SuOpenAdapter(SU *u, char *adapter_id)
TOKEN_LIST *SuEnumAdapters(SU *u) TOKEN_LIST *SuEnumAdapters(SU *u)
{ {
UINT i; UINT i;
UINT ret_size; DWORD ret_size;
TOKEN_LIST *ret; TOKEN_LIST *ret;
// Validate arguments // Validate arguments
if (u == NULL) if (u == NULL)
@@ -730,7 +730,7 @@ TOKEN_LIST *SuEnumAdapters(SU *u)
LIST *SuGetAdapterList(SU *u) LIST *SuGetAdapterList(SU *u)
{ {
LIST *ret; LIST *ret;
UINT read_size; DWORD read_size;
UINT i; UINT i;
// Validate arguments // Validate arguments
if (u == NULL) if (u == NULL)
@@ -893,7 +893,7 @@ SU *SuInitEx(UINT wait_for_bind_complete_tick)
{ {
void *h; void *h;
SU *u; SU *u;
UINT read_size; DWORD read_size;
bool flag = false; bool flag = false;
UINT64 giveup_tick = 0; UINT64 giveup_tick = 0;
static bool flag2 = false; // flag2 must be global static bool flag2 = false; // flag2 must be global
+4 -4
View File
@@ -964,7 +964,7 @@ void *CreateWizardPageInstance(WIZARD *w, WIZARD_PAGE *p)
t.lParam = (LPARAM)p->DialogParam; t.lParam = (LPARAM)p->DialogParam;
return CreatePropertySheetPageW(&t); return CreatePropertySheetPageW((LPCPROPSHEETPAGEW)&t);
} }
// Create a new wizard // Create a new wizard
@@ -2368,7 +2368,7 @@ void AdjustWindowAndControlSize(HWND hWnd, bool *need_resize, double *factor_x,
*need_resize = true; *need_resize = true;
// Get the font of the current window // 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 // Get the width and height of the font of the current window
CalcFontSize(hDlgFont, &dlgfont_x, &dlgfont_y); 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 // Copy once the transfer source
Zero(&bi, sizeof(bi)); Zero(&bi, sizeof(bi));
Copy(&bi.bmiHeader, &h, sizeof(BITMAPINFOHEADER)); 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); 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)); Zero(&bi, sizeof(bi));
Copy(&bi.bmiHeader, &h, sizeof(BITMAPINFOHEADER)); 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) if(srcData != NULL && data != NULL)
{ {
+2 -2
View File
@@ -9265,12 +9265,12 @@ bool Win32GetDnsSuffix(char *domain, UINT size)
info_size = 0; info_size = 0;
info = ZeroMalloc(sizeof(IP_ADAPTER_ADDRESSES_XP)); 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); Free(info);
info = ZeroMalloc(info_size); 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); Free(info);
return false; return false;
+6 -6
View File
@@ -195,7 +195,7 @@ void Win32InitNewThread()
bool Win32SetFolderCompressW(wchar_t *path, bool compressed) bool Win32SetFolderCompressW(wchar_t *path, bool compressed)
{ {
HANDLE h; HANDLE h;
UINT retsize = 0; DWORD retsize = 0;
USHORT flag; USHORT flag;
wchar_t tmp[MAX_PATH]; wchar_t tmp[MAX_PATH];
// Validate arguments // Validate arguments
@@ -239,7 +239,7 @@ bool Win32SetFolderCompressW(wchar_t *path, bool compressed)
bool Win32SetFolderCompress(char *path, bool compressed) bool Win32SetFolderCompress(char *path, bool compressed)
{ {
HANDLE h; HANDLE h;
UINT retsize = 0; DWORD retsize = 0;
USHORT flag; USHORT flag;
char tmp[MAX_PATH]; char tmp[MAX_PATH];
// Validate arguments // Validate arguments
@@ -2822,7 +2822,7 @@ bool Win32InitThread(THREAD *t)
{ {
WIN32THREAD *w; WIN32THREAD *w;
HANDLE hThread; HANDLE hThread;
DWORD thread_id; UINT thread_id;
WIN32THREADSTARTUPINFO *info; WIN32THREADSTARTUPINFO *info;
// Validate arguments // Validate arguments
if (t == NULL) if (t == NULL)
@@ -3033,13 +3033,13 @@ void Win32GetSystemTime(SYSTEMTIME *system_time)
// Increment of 32bit integer // Increment of 32bit integer
void Win32Inc32(UINT *value) void Win32Inc32(UINT *value)
{ {
InterlockedIncrement(value); InterlockedIncrement((volatile LONG *)value);
} }
// Decrement of 32bit integer // Decrement of 32bit integer
void Win32Dec32(UINT *value) void Win32Dec32(UINT *value)
{ {
InterlockedDecrement(value); InterlockedDecrement((volatile LONG *)value);
} }
// Sleep the thread // Sleep the thread
@@ -3341,7 +3341,7 @@ char *Win32InputFromFileLineA()
while (true) while (true)
{ {
char c; char c;
UINT read_size = 0; DWORD read_size = 0;
if (ReadFile(hstdin, &c, 1, &read_size, NULL) == false) if (ReadFile(hstdin, &c, 1, &read_size, NULL) == false)
{ {