1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-12-26 18:19:53 +03:00

Remove "UINT32" and "DWORD", use "UINT" everywhere for consistency

This commit is contained in:
Davide Beatrici 2020-08-15 08:31:45 +02:00
parent e18bb465c9
commit 69cd39616b
8 changed files with 79 additions and 81 deletions

View File

@ -3491,7 +3491,7 @@ PPP_LCP *BuildEAPTlsPacketEx(UCHAR code, UCHAR id, UCHAR type, UINT datasize, UC
UINT tls_datasize = datasize + sizeof(UCHAR);
if (flags & PPP_EAP_TLS_FLAG_TLS_LENGTH)
{
tls_datasize += sizeof(UINT32);
tls_datasize += sizeof(UINT);
}
lcp_packet = BuildEAPPacketEx(code, id, type, tls_datasize);
eap_packet = lcp_packet->Data;

View File

@ -202,7 +202,7 @@ struct PPP_EAP
UCHAR TlsDataWithoutLength[0];
struct
{
UINT32 TlsLength;
UINT TlsLength;
UCHAR Data[0];
} TlsDataWithLength;
};

View File

@ -220,7 +220,7 @@ UINT64 TickGetRealtimeTickValue64()
}
else
{
ret = (UINT64)((UINT64)((UINT32)tv.tv_sec)) * 1000ULL + (UINT64)tv.tv_usec / 1000ULL;
ret = (UINT64)((UINT64)((UINT)tv.tv_sec)) * 1000ULL + (UINT64)tv.tv_usec / 1000ULL;
}
return ret;

View File

@ -181,8 +181,6 @@ typedef unsigned int bool;
// 32bit integer type
#ifndef WINDOWS_H
typedef unsigned int UINT;
typedef unsigned int UINT32;
typedef unsigned int DWORD;
typedef signed int INT;
#endif

View File

@ -4427,7 +4427,7 @@ bool MsServiceStopProc()
}
// Service handler
void CALLBACK MsServiceHandler(DWORD opcode)
void CALLBACK MsServiceHandler(UINT opcode)
{
switch (opcode)
{
@ -4451,7 +4451,7 @@ void CALLBACK MsServiceHandler(DWORD opcode)
}
// Dispatch function of the service
void CALLBACK MsServiceDispatcher(DWORD argc, LPTSTR *argv)
void CALLBACK MsServiceDispatcher(UINT argc, LPTSTR *argv)
{
// Creating a stopping event
service_stop_event = CreateEventA(NULL, true, false, NULL);
@ -10513,7 +10513,7 @@ bool MsIsAeroEnabled()
}
// Generate an access mask to force accessing to the 32 bit registry key for 64 bit application
DWORD MsRegAccessMaskFor64BitEx(bool force32bit, bool force64bit)
UINT MsRegAccessMaskFor64BitEx(bool force32bit, bool force64bit)
{
if (MsIs64BitWindows() == false)
{

View File

@ -158,29 +158,29 @@ typedef struct NETWORK_WIN32_FUNCTIONS
{
HINSTANCE hIpHlpApi32;
HINSTANCE hIcmp;
DWORD (WINAPI *DeleteIpForwardEntry)(PMIB_IPFORWARDROW);
DWORD (WINAPI *CreateIpForwardEntry)(PMIB_IPFORWARDROW);
DWORD (WINAPI *GetIpForwardTable)(PMIB_IPFORWARDTABLE, PULONG, BOOL);
DWORD (WINAPI *GetNetworkParams)(PFIXED_INFO, PULONG);
UINT (WINAPI *DeleteIpForwardEntry)(PMIB_IPFORWARDROW);
UINT (WINAPI *CreateIpForwardEntry)(PMIB_IPFORWARDROW);
UINT (WINAPI *GetIpForwardTable)(PMIB_IPFORWARDTABLE, PULONG, BOOL);
UINT (WINAPI *GetNetworkParams)(PFIXED_INFO, PULONG);
ULONG (WINAPI *GetAdaptersAddresses)(ULONG, ULONG, PVOID, PIP_ADAPTER_ADDRESSES, PULONG);
DWORD (WINAPI *GetIfTable)(PMIB_IFTABLE, PULONG, BOOL);
DWORD (WINAPI *GetIfTable2)(void **);
UINT (WINAPI *GetIfTable)(PMIB_IFTABLE, PULONG, BOOL);
UINT (WINAPI *GetIfTable2)(void **);
void (WINAPI *FreeMibTable)(PVOID);
DWORD (WINAPI *IpRenewAddress)(PIP_ADAPTER_INDEX_MAP);
DWORD (WINAPI *IpReleaseAddress)(PIP_ADAPTER_INDEX_MAP);
DWORD (WINAPI *GetInterfaceInfo)(PIP_INTERFACE_INFO, PULONG);
DWORD (WINAPI *GetAdaptersInfo)(PIP_ADAPTER_INFO, PULONG);
DWORD (WINAPI *GetExtendedTcpTable)(PVOID, PDWORD, BOOL, ULONG, _TCP_TABLE_CLASS, ULONG);
DWORD (WINAPI *AllocateAndGetTcpExTableFromStack)(PVOID *, BOOL, HANDLE, DWORD, DWORD);
DWORD (WINAPI *GetTcpTable)(PMIB_TCPTABLE, PDWORD, BOOL);
DWORD (WINAPI *NotifyRouteChange)(PHANDLE, LPOVERLAPPED);
UINT (WINAPI *IpRenewAddress)(PIP_ADAPTER_INDEX_MAP);
UINT (WINAPI *IpReleaseAddress)(PIP_ADAPTER_INDEX_MAP);
UINT (WINAPI *GetInterfaceInfo)(PIP_INTERFACE_INFO, PULONG);
UINT (WINAPI *GetAdaptersInfo)(PIP_ADAPTER_INFO, PULONG);
UINT (WINAPI *GetExtendedTcpTable)(PVOID, PUINT, BOOL, ULONG, _TCP_TABLE_CLASS, ULONG);
UINT (WINAPI *AllocateAndGetTcpExTableFromStack)(PVOID *, BOOL, HANDLE, UINT, UINT);
UINT (WINAPI *GetTcpTable)(PMIB_TCPTABLE, PUINT, BOOL);
UINT (WINAPI *NotifyRouteChange)(PHANDLE, LPOVERLAPPED);
BOOL (WINAPI *CancelIPChangeNotify)(LPOVERLAPPED);
DWORD (WINAPI *NhpAllocateAndGetInterfaceInfoFromStack)(IP_INTERFACE_NAME_INFO **,
PDWORD, BOOL, HANDLE, DWORD);
UINT (WINAPI *NhpAllocateAndGetInterfaceInfoFromStack)(IP_INTERFACE_NAME_INFO **,
PUINT, BOOL, HANDLE, UINT);
HANDLE (WINAPI *IcmpCreateFile)();
BOOL (WINAPI *IcmpCloseHandle)(HANDLE);
DWORD (WINAPI *IcmpSendEcho)(HANDLE, IPAddr, LPVOID, WORD, PIP_OPTION_INFORMATION,
LPVOID, DWORD, DWORD);
UINT (WINAPI *IcmpSendEcho)(HANDLE, IPAddr, LPVOID, WORD, PIP_OPTION_INFORMATION,
LPVOID, UINT, UINT);
} NETWORK_WIN32_FUNCTIONS;
#endif
@ -222,7 +222,7 @@ typedef struct _MS_WCM_PROFILE_INFO {
} MS_WCM_PROFILE_INFO, *MS_PWCM_PROFILE_INFO;
typedef struct _MS_WCM_PROFILE_INFO_LIST {
DWORD dwNumberOfItems;
UINT dwNumberOfItems;
MS_WCM_PROFILE_INFO ProfileInfo[1];
@ -310,68 +310,68 @@ typedef struct NT_API
HINSTANCE hDbgHelp;
HINSTANCE hWcmapi;
HINSTANCE hDwmapi;
BOOL (WINAPI *OpenProcessToken)(HANDLE, DWORD, PHANDLE);
BOOL (WINAPI *OpenProcessToken)(HANDLE, UINT, PHANDLE);
BOOL (WINAPI *LookupPrivilegeValue)(char *, char *, PLUID);
BOOL (WINAPI *AdjustTokenPrivileges)(HANDLE, BOOL, PTOKEN_PRIVILEGES, DWORD, PTOKEN_PRIVILEGES, PDWORD);
BOOL (WINAPI *InitiateSystemShutdown)(LPTSTR, LPTSTR, DWORD, BOOL, BOOL);
BOOL (WINAPI *LogonUserW)(wchar_t *, wchar_t *, wchar_t *, DWORD, DWORD, HANDLE *);
BOOL (WINAPI *LogonUserA)(char *, char *, char *, DWORD, DWORD, HANDLE *);
BOOL (WINAPI *AdjustTokenPrivileges)(HANDLE, BOOL, PTOKEN_PRIVILEGES, UINT, PTOKEN_PRIVILEGES, PUINT);
BOOL (WINAPI *InitiateSystemShutdown)(LPTSTR, LPTSTR, UINT, BOOL, BOOL);
BOOL (WINAPI *LogonUserW)(wchar_t *, wchar_t *, wchar_t *, UINT, UINT, HANDLE *);
BOOL (WINAPI *LogonUserA)(char *, char *, char *, UINT, UINT, HANDLE *);
BOOL (WINAPI *UpdateDriverForPlugAndPlayDevicesW)(HWND hWnd, wchar_t *hardware_id, wchar_t *inf_path, UINT flag, BOOL *need_reboot);
UINT (WINAPI *CM_Get_DevNode_Status_Ex)(UINT *, UINT *, DWORD, UINT, HANDLE);
UINT (WINAPI *CM_Get_Device_ID_ExA)(DWORD, char *, UINT, UINT, HANDLE);
UINT (WINAPI *WTSQuerySessionInformation)(HANDLE, DWORD, WTS_INFO_CLASS, wchar_t *, DWORD *);
UINT (WINAPI *CM_Get_DevNode_Status_Ex)(UINT *, UINT *, UINT, UINT, HANDLE);
UINT (WINAPI *CM_Get_Device_ID_ExA)(UINT, char *, UINT, UINT, HANDLE);
UINT (WINAPI *WTSQuerySessionInformation)(HANDLE, UINT, WTS_INFO_CLASS, wchar_t *, UINT *);
void (WINAPI *WTSFreeMemory)(void *);
BOOL (WINAPI *WTSDisconnectSession)(HANDLE, DWORD, BOOL);
BOOL (WINAPI *WTSEnumerateSessions)(HANDLE, DWORD, DWORD, PWTS_SESSION_INFO *, DWORD *);
BOOL (WINAPI *WTSRegisterSessionNotification)(HWND, DWORD);
BOOL (WINAPI *WTSDisconnectSession)(HANDLE, UINT, BOOL);
BOOL (WINAPI *WTSEnumerateSessions)(HANDLE, UINT, UINT, PWTS_SESSION_INFO *, UINT *);
BOOL (WINAPI *WTSRegisterSessionNotification)(HWND, UINT);
BOOL (WINAPI *WTSUnRegisterSessionNotification)(HWND);
SC_HANDLE (WINAPI *OpenSCManager)(LPCTSTR, LPCTSTR, DWORD);
SC_HANDLE (WINAPI *CreateServiceA)(SC_HANDLE, LPCTSTR, LPCTSTR, DWORD, DWORD, DWORD, DWORD, LPCTSTR, LPCTSTR, LPDWORD, LPCTSTR, LPCTSTR, LPCTSTR);
SC_HANDLE (WINAPI *CreateServiceW)(SC_HANDLE, LPCWSTR, LPCWSTR, DWORD, DWORD, DWORD, DWORD, LPCWSTR, LPCWSTR, LPDWORD, LPCWSTR, LPCWSTR, LPCWSTR);
BOOL (WINAPI *ChangeServiceConfig2)(SC_HANDLE, DWORD, LPVOID);
SC_HANDLE (WINAPI *OpenSCManager)(LPCTSTR, LPCTSTR, UINT);
SC_HANDLE (WINAPI *CreateServiceA)(SC_HANDLE, LPCTSTR, LPCTSTR, UINT, UINT, UINT, UINT, LPCTSTR, LPCTSTR, LPUINT, LPCTSTR, LPCTSTR, LPCTSTR);
SC_HANDLE (WINAPI *CreateServiceW)(SC_HANDLE, LPCWSTR, LPCWSTR, UINT, UINT, UINT, UINT, LPCWSTR, LPCWSTR, LPUINT, LPCWSTR, LPCWSTR, LPCWSTR);
BOOL (WINAPI *ChangeServiceConfig2)(SC_HANDLE, UINT, LPVOID);
BOOL (WINAPI *CloseServiceHandle)(SC_HANDLE);
SC_HANDLE (WINAPI *OpenService)(SC_HANDLE, LPCTSTR, DWORD);
SC_HANDLE (WINAPI *OpenService)(SC_HANDLE, LPCTSTR, UINT);
BOOL (WINAPI *QueryServiceStatus)(SC_HANDLE, LPSERVICE_STATUS);
BOOL (WINAPI *StartService)(SC_HANDLE, DWORD, LPCTSTR);
BOOL (WINAPI *ControlService)(SC_HANDLE, DWORD, LPSERVICE_STATUS);
BOOL (WINAPI *StartService)(SC_HANDLE, UINT, LPCTSTR);
BOOL (WINAPI *ControlService)(SC_HANDLE, UINT, LPSERVICE_STATUS);
BOOL (WINAPI *SetServiceStatus)(SERVICE_STATUS_HANDLE, LPSERVICE_STATUS);
SERVICE_STATUS_HANDLE (WINAPI *RegisterServiceCtrlHandler)(LPCTSTR, LPHANDLER_FUNCTION);
BOOL (WINAPI *StartServiceCtrlDispatcher)(CONST LPSERVICE_TABLE_ENTRY);
BOOL (WINAPI *DeleteService)(SC_HANDLE);
BOOL (WINAPI *EnumProcesses)(DWORD *, DWORD, DWORD *);
BOOL (WINAPI *EnumProcessModules)(HANDLE, HMODULE *, DWORD, DWORD *);
DWORD (WINAPI *GetModuleFileNameExA)(HANDLE, HMODULE, LPSTR, DWORD);
DWORD (WINAPI *GetModuleFileNameExW)(HANDLE, HMODULE, LPWSTR, DWORD);
DWORD (WINAPI *GetProcessImageFileNameA)(HANDLE, LPSTR, DWORD);
DWORD (WINAPI *GetProcessImageFileNameW)(HANDLE, LPWSTR, DWORD);
BOOL (WINAPI *QueryFullProcessImageNameA)(HANDLE, DWORD, LPSTR, PDWORD);
BOOL (WINAPI *QueryFullProcessImageNameW)(HANDLE, DWORD, LPWSTR, PDWORD);
LONG (WINAPI *RegDeleteKeyExA)(HKEY, LPCTSTR, REGSAM, DWORD);
BOOL (WINAPI *EnumProcesses)(UINT *, UINT, UINT *);
BOOL (WINAPI *EnumProcessModules)(HANDLE, HMODULE *, UINT, UINT *);
UINT (WINAPI *GetModuleFileNameExA)(HANDLE, HMODULE, LPSTR, UINT);
UINT (WINAPI *GetModuleFileNameExW)(HANDLE, HMODULE, LPWSTR, UINT);
UINT (WINAPI *GetProcessImageFileNameA)(HANDLE, LPSTR, UINT);
UINT (WINAPI *GetProcessImageFileNameW)(HANDLE, LPWSTR, UINT);
BOOL (WINAPI *QueryFullProcessImageNameA)(HANDLE, UINT, LPSTR, PUINT);
BOOL (WINAPI *QueryFullProcessImageNameW)(HANDLE, UINT, LPWSTR, PUINT);
LONG (WINAPI *RegDeleteKeyExA)(HKEY, LPCTSTR, REGSAM, UINT);
BOOL (WINAPI *IsWow64Process)(HANDLE, BOOL *);
void (WINAPI *GetNativeSystemInfo)(SYSTEM_INFO *);
BOOL (WINAPI *DuplicateTokenEx)(HANDLE, DWORD, SECURITY_ATTRIBUTES *, SECURITY_IMPERSONATION_LEVEL, TOKEN_TYPE, HANDLE *);
BOOL (WINAPI *DuplicateTokenEx)(HANDLE, UINT, SECURITY_ATTRIBUTES *, SECURITY_IMPERSONATION_LEVEL, TOKEN_TYPE, HANDLE *);
BOOL (WINAPI *ConvertStringSidToSidA)(LPCSTR, PSID *);
BOOL (WINAPI *SetTokenInformation)(HANDLE, TOKEN_INFORMATION_CLASS, void *, DWORD);
BOOL (WINAPI *GetTokenInformation)(HANDLE, TOKEN_INFORMATION_CLASS, void *, DWORD, PDWORD);
BOOL (WINAPI *CreateProcessAsUserA)(HANDLE, LPCSTR, LPSTR, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, BOOL, DWORD, void *, LPCSTR, LPSTARTUPINFOA, LPPROCESS_INFORMATION);
BOOL (WINAPI *CreateProcessAsUserW)(HANDLE, LPCWSTR, LPWSTR, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, BOOL, DWORD, void *, LPCWSTR, LPSTARTUPINFOW, LPPROCESS_INFORMATION);
BOOL (WINAPI *LookupAccountSidA)(LPCSTR,PSID,LPSTR,LPDWORD,LPSTR,LPDWORD,PSID_NAME_USE);
BOOL (WINAPI *LookupAccountNameA)(LPCSTR,LPCSTR,PSID,LPDWORD,LPSTR,LPDWORD,PSID_NAME_USE);
BOOL (WINAPI *SetTokenInformation)(HANDLE, TOKEN_INFORMATION_CLASS, void *, UINT);
BOOL (WINAPI *GetTokenInformation)(HANDLE, TOKEN_INFORMATION_CLASS, void *, UINT, PUINT);
BOOL (WINAPI *CreateProcessAsUserA)(HANDLE, LPCSTR, LPSTR, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, BOOL, UINT, void *, LPCSTR, LPSTARTUPINFOA, LPPROCESS_INFORMATION);
BOOL (WINAPI *CreateProcessAsUserW)(HANDLE, LPCWSTR, LPWSTR, LPSECURITY_ATTRIBUTES, LPSECURITY_ATTRIBUTES, BOOL, UINT, void *, LPCWSTR, LPSTARTUPINFOW, LPPROCESS_INFORMATION);
BOOL (WINAPI *LookupAccountSidA)(LPCSTR,PSID,LPSTR,LPUINT,LPSTR,LPUINT,PSID_NAME_USE);
BOOL (WINAPI *LookupAccountNameA)(LPCSTR,LPCSTR,PSID,LPUINT,LPSTR,LPUINT,PSID_NAME_USE);
BOOL (WINAPI *GetUserNameExA)(EXTENDED_NAME_FORMAT, LPSTR, PULONG);
BOOL (WINAPI *GetUserNameExW)(EXTENDED_NAME_FORMAT, LPWSTR, PULONG);
BOOL (WINAPI *SwitchDesktop)(HDESK);
HDESK (WINAPI *OpenDesktopA)(LPTSTR, DWORD, BOOL, ACCESS_MASK);
HDESK (WINAPI *OpenDesktopA)(LPTSTR, UINT, BOOL, ACCESS_MASK);
BOOL (WINAPI *CloseDesktop)(HDESK);
BOOL (WINAPI *SetProcessShutdownParameters)(DWORD, DWORD);
BOOL (WINAPI *SetProcessShutdownParameters)(UINT, UINT);
HANDLE (WINAPI *RegisterEventSourceW)(LPCWSTR, LPCWSTR);
BOOL (WINAPI *ReportEventW)(HANDLE, WORD, WORD, DWORD, PSID, WORD, DWORD, LPCWSTR *, LPVOID);
BOOL (WINAPI *ReportEventW)(HANDLE, WORD, WORD, UINT, PSID, WORD, UINT, LPCWSTR *, LPVOID);
BOOL (WINAPI *DeregisterEventSource)(HANDLE);
BOOL (WINAPI *Wow64DisableWow64FsRedirection)(void **);
BOOLEAN (WINAPI *Wow64EnableWow64FsRedirection)(BOOLEAN);
BOOL (WINAPI *Wow64RevertWow64FsRedirection)(void *);
BOOL (WINAPI *GetFileInformationByHandle)(HANDLE, LPBY_HANDLE_FILE_INFORMATION);
HANDLE (WINAPI *GetProcessHeap)();
BOOL (WINAPI *MiniDumpWriteDump)(HANDLE, DWORD, HANDLE, MINIDUMP_TYPE,
BOOL (WINAPI *MiniDumpWriteDump)(HANDLE, UINT, HANDLE, MINIDUMP_TYPE,
PMINIDUMP_EXCEPTION_INFORMATION, PMINIDUMP_USER_STREAM_INFORMATION,
PMINIDUMP_CALLBACK_INFORMATION);
BOOL (WINAPI *AllocateLocallyUniqueId)(PLUID);
@ -382,14 +382,14 @@ typedef struct NT_API
PQUOTA_LIMITS, PNTSTATUS);
NTSTATUS (NTAPI *LsaDeregisterLogonProcess)(HANDLE);
NTSTATUS (NTAPI *LsaFreeReturnBuffer)(PVOID);
DWORD (WINAPI *WcmQueryProperty)(const GUID *, LPCWSTR, MS_WCM_PROPERTY, PVOID, PDWORD, PBYTE *);
DWORD (WINAPI *WcmSetProperty)(const GUID *, LPCWSTR, MS_WCM_PROPERTY, PVOID, DWORD, const BYTE *);
UINT (WINAPI *WcmQueryProperty)(const GUID *, LPCWSTR, MS_WCM_PROPERTY, PVOID, PUINT, PBYTE *);
UINT (WINAPI *WcmSetProperty)(const GUID *, LPCWSTR, MS_WCM_PROPERTY, PVOID, UINT, const BYTE *);
void (WINAPI *WcmFreeMemory)(PVOID);
DWORD (WINAPI *WcmGetProfileList)(PVOID, MS_WCM_PROFILE_INFO_LIST **ppProfileList);
DWORD (WINAPI *SetNamedSecurityInfoW)(LPWSTR, UINT, SECURITY_INFORMATION, PSID, PSID, PACL, PACL);
BOOL (WINAPI *AddAccessAllowedAceEx)(PACL, DWORD, DWORD, DWORD, PSID);
UINT (WINAPI *WcmGetProfileList)(PVOID, MS_WCM_PROFILE_INFO_LIST **ppProfileList);
UINT (WINAPI *SetNamedSecurityInfoW)(LPWSTR, UINT, SECURITY_INFORMATION, PSID, PSID, PACL, PACL);
BOOL (WINAPI *AddAccessAllowedAceEx)(PACL, UINT, UINT, UINT, PSID);
HRESULT (WINAPI *DwmIsCompositionEnabled)(BOOL *);
BOOL (WINAPI *GetComputerNameExW)(COMPUTER_NAME_FORMAT, LPWSTR, LPDWORD);
BOOL (WINAPI *GetComputerNameExW)(COMPUTER_NAME_FORMAT, LPWSTR, LPUINT);
LONG (WINAPI *RegLoadKeyW)(HKEY, LPCWSTR, LPCWSTR);
LONG (WINAPI *RegUnLoadKeyW)(HKEY, LPCWSTR);
} NT_API;
@ -413,7 +413,7 @@ typedef struct MS_USERMODE_SVC_PULSE_THREAD_PARAM
// Structure to suppress the warning message
typedef struct NO_WARNING
{
DWORD ThreadId;
UINT ThreadId;
THREAD *NoWarningThread;
EVENT *HaltEvent;
volatile bool Halt;
@ -541,7 +541,7 @@ void MsFree();
char *MsCutExeNameFromCommandLine(char *str);
wchar_t *MsCutExeNameFromUniCommandLine(wchar_t *str);
DWORD MsRegAccessMaskFor64BitEx(bool force32bit, bool force64bit);
UINT MsRegAccessMaskFor64BitEx(bool force32bit, bool force64bit);
bool MsRegIsKey(UINT root, char *name);
bool MsRegIsKeyEx(UINT root, char *name, bool force32bit);
@ -946,8 +946,8 @@ bool MsStartDevice(HDEVINFO info, SP_DEVINFO_DATA *dev_info_data);
bool MsStopDevice(HDEVINFO info, SP_DEVINFO_DATA *dev_info_data);
bool MsDeleteDevice(HDEVINFO info, SP_DEVINFO_DATA *dev_info_data);
bool MsIsDeviceRunning(HDEVINFO info, SP_DEVINFO_DATA *dev_info_data);
void CALLBACK MsServiceDispatcher(DWORD argc, LPTSTR *argv);
void CALLBACK MsServiceHandler(DWORD opcode);
void CALLBACK MsServiceDispatcher(UINT argc, LPTSTR *argv);
void CALLBACK MsServiceHandler(UINT opcode);
bool MsServiceStopProc();
void MsServiceStoperMainThread(THREAD *t, void *p);
void MsServiceStarterMainThread(THREAD *t, void *p);

View File

@ -14948,7 +14948,7 @@ void QuerySocketInformation(SOCK *sock)
struct sockaddr_in6 sockaddr6;
struct in6_addr *addr6;
int size;
DWORD dw;
UINT dw;
UINT opt_value = 0;
if (sock->Type == SOCK_TCP)
@ -15038,7 +15038,7 @@ void QuerySocketInformation(SOCK *sock)
}
// Support of the TTL value
size = sizeof(DWORD);
size = sizeof(UINT);
if (opt_value == 0 ||
getsockopt(sock->socket, (sock->IPv6 ? IPPROTO_IPV6 : IPPROTO_IP), opt_value, (char *)&dw, &size) != 0)
{
@ -15056,7 +15056,7 @@ void QuerySocketInformation(SOCK *sock)
// Setting the TTL value
bool SetTtl(SOCK *sock, UINT ttl)
{
DWORD dw;
UINT dw;
int size;
UINT opt_value = 0;
// Validate arguments
@ -15076,7 +15076,7 @@ bool SetTtl(SOCK *sock, UINT ttl)
}
dw = ttl;
size = sizeof(DWORD);
size = sizeof(UINT);
if (sock->IPv6)
{

View File

@ -1938,7 +1938,7 @@ void UnixGetSystemTime(SYSTEMTIME *system_time)
if (sizeof(time_t) == 4)
{
now2 = (time_64t)((UINT64)((UINT32)now));
now2 = (time_64t)((UINT64)((UINT)now));
}
else
{
@ -1976,7 +1976,7 @@ UINT64 UnixGetTick64()
clock_gettime(CLOCK_REALTIME, &t);
#endif
ret = ((UINT64)((UINT32)t.tv_sec)) * 1000LL + (UINT64)t.tv_nsec / 1000000LL;
ret = ((UINT64)((UINT)t.tv_sec)) * 1000LL + (UINT64)t.tv_nsec / 1000000LL;
if (ret == 0)
{