mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2024-11-22 09:29:52 +03:00
Merge PR #1282: Use bool from stdbool.h, get rid of BOOL
This commit is contained in:
commit
4506b60e80
@ -379,7 +379,7 @@ void CmPolicyDlg(HWND hWnd, CM_STATUS *st);
|
|||||||
UINT CmPolicyDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param);
|
UINT CmPolicyDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param);
|
||||||
void CmPolicyDlgPrint(HWND hWnd, CM_POLICY *p);
|
void CmPolicyDlgPrint(HWND hWnd, CM_POLICY *p);
|
||||||
void CmPolicyDlgPrintEx(HWND hWnd, CM_POLICY *p, bool cascade_mode);
|
void CmPolicyDlgPrintEx(HWND hWnd, CM_POLICY *p, bool cascade_mode);
|
||||||
void CmPolicyDlgPrintEx2(HWND hWnd, CM_POLICY *p, bool cascade_mode, bool ver);
|
void CmPolicyDlgPrintEx2(HWND hWnd, CM_POLICY *p, bool cascade_mode, UINT ver);
|
||||||
void CmNewAccount(HWND hWnd);
|
void CmNewAccount(HWND hWnd);
|
||||||
void CmEditAccount(HWND hWnd, wchar_t *account_name);
|
void CmEditAccount(HWND hWnd, wchar_t *account_name);
|
||||||
void CmGenerateNewAccountName(HWND hWnd, wchar_t *name, UINT size);
|
void CmGenerateNewAccountName(HWND hWnd, wchar_t *name, UINT size);
|
||||||
|
@ -24,10 +24,6 @@
|
|||||||
|
|
||||||
#endif // VPN_SPEED
|
#endif // VPN_SPEED
|
||||||
|
|
||||||
#define bool UINT
|
|
||||||
#define BOOL UINT
|
|
||||||
|
|
||||||
|
|
||||||
// Version number
|
// Version number
|
||||||
#ifndef CEDAR_VERSION_MAJOR
|
#ifndef CEDAR_VERSION_MAJOR
|
||||||
#define CEDAR_VERSION_MAJOR 0
|
#define CEDAR_VERSION_MAJOR 0
|
||||||
|
@ -23025,7 +23025,7 @@ void CtEscapeCsv(wchar_t *dst, UINT size, wchar_t *src){
|
|||||||
UINT i;
|
UINT i;
|
||||||
UINT len = UniStrLen(src);
|
UINT len = UniStrLen(src);
|
||||||
UINT idx;
|
UINT idx;
|
||||||
BOOL need_to_escape = false;
|
bool need_to_escape = false;
|
||||||
wchar_t tmp[2]=L"*";
|
wchar_t tmp[2]=L"*";
|
||||||
|
|
||||||
// Check the input value
|
// Check the input value
|
||||||
|
@ -149,7 +149,7 @@ struct UDP
|
|||||||
// Data block
|
// Data block
|
||||||
struct BLOCK
|
struct BLOCK
|
||||||
{
|
{
|
||||||
BOOL Compressed; // Compression flag
|
bool Compressed; // Compression flag
|
||||||
UINT Size; // Block size
|
UINT Size; // Block size
|
||||||
UINT SizeofData; // Data size
|
UINT SizeofData; // Data size
|
||||||
UCHAR *Buf; // Buffer
|
UCHAR *Buf; // Buffer
|
||||||
|
@ -51,7 +51,7 @@ struct RPC_ENUM_DEVICE
|
|||||||
// License status of the service
|
// License status of the service
|
||||||
struct RPC_EL_LICENSE_STATUS
|
struct RPC_EL_LICENSE_STATUS
|
||||||
{
|
{
|
||||||
BOOL Valid; // Enable flag
|
bool Valid; // Enable flag
|
||||||
UINT64 SystemId; // System ID
|
UINT64 SystemId; // System ID
|
||||||
UINT64 SystemExpires; // System expiration date
|
UINT64 SystemExpires; // System expiration date
|
||||||
};
|
};
|
||||||
@ -74,7 +74,7 @@ struct EL_DEVICE
|
|||||||
// License status
|
// License status
|
||||||
struct EL_LICENSE_STATUS
|
struct EL_LICENSE_STATUS
|
||||||
{
|
{
|
||||||
BOOL Valid; // Enable flag
|
bool Valid; // Enable flag
|
||||||
UINT64 SystemId; // System ID
|
UINT64 SystemId; // System ID
|
||||||
UINT64 Expires; // Expiration date
|
UINT64 Expires; // Expiration date
|
||||||
};
|
};
|
||||||
|
142
src/Cedar/Hub.c
142
src/Cedar/Hub.c
@ -7,6 +7,13 @@
|
|||||||
|
|
||||||
#include "CedarPch.h"
|
#include "CedarPch.h"
|
||||||
|
|
||||||
|
#define GetHubAdminOptionDataAndSet(ao, name, dest) \
|
||||||
|
value = GetHubAdminOptionData(ao, name); \
|
||||||
|
if (value != INFINITE) \
|
||||||
|
{ \
|
||||||
|
dest = value; \
|
||||||
|
}
|
||||||
|
|
||||||
static UCHAR broadcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
static UCHAR broadcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||||
static char vgs_ua_str[9] = {0};
|
static char vgs_ua_str[9] = {0};
|
||||||
static bool g_vgs_emb_tag = false;
|
static bool g_vgs_emb_tag = false;
|
||||||
@ -516,23 +523,6 @@ UINT GetHubAdminOptionData(RPC_ADMIN_OPTION *ao, char *name)
|
|||||||
|
|
||||||
return INFINITE;
|
return INFINITE;
|
||||||
}
|
}
|
||||||
void GetHubAdminOptionDataAndSet(RPC_ADMIN_OPTION *ao, char *name, UINT *dest)
|
|
||||||
{
|
|
||||||
UINT value;
|
|
||||||
// Validate arguments
|
|
||||||
if (ao == NULL || name == NULL || dest == NULL)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
value = GetHubAdminOptionData(ao, name);
|
|
||||||
if (value == INFINITE)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
*dest = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the contents of the HUB_OPTION based on the data
|
// Set the contents of the HUB_OPTION based on the data
|
||||||
void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao)
|
void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao)
|
||||||
@ -543,64 +533,66 @@ void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GetHubAdminOptionDataAndSet(ao, "NoAddressPollingIPv4", &o->NoArpPolling);
|
UINT value;
|
||||||
GetHubAdminOptionDataAndSet(ao, "NoAddressPollingIPv6", &o->NoIPv6AddrPolling);
|
|
||||||
GetHubAdminOptionDataAndSet(ao, "NoIpTable", &o->NoIpTable);
|
GetHubAdminOptionDataAndSet(ao, "NoAddressPollingIPv4", o->NoArpPolling);
|
||||||
GetHubAdminOptionDataAndSet(ao, "NoMacAddressLog", &o->NoMacAddressLog);
|
GetHubAdminOptionDataAndSet(ao, "NoAddressPollingIPv6", o->NoIPv6AddrPolling);
|
||||||
GetHubAdminOptionDataAndSet(ao, "ManageOnlyPrivateIP", &o->ManageOnlyPrivateIP);
|
GetHubAdminOptionDataAndSet(ao, "NoIpTable", o->NoIpTable);
|
||||||
GetHubAdminOptionDataAndSet(ao, "ManageOnlyLocalUnicastIPv6", &o->ManageOnlyLocalUnicastIPv6);
|
GetHubAdminOptionDataAndSet(ao, "NoMacAddressLog", o->NoMacAddressLog);
|
||||||
GetHubAdminOptionDataAndSet(ao, "DisableIPParsing", &o->DisableIPParsing);
|
GetHubAdminOptionDataAndSet(ao, "ManageOnlyPrivateIP", o->ManageOnlyPrivateIP);
|
||||||
GetHubAdminOptionDataAndSet(ao, "YieldAfterStorePacket", &o->YieldAfterStorePacket);
|
GetHubAdminOptionDataAndSet(ao, "ManageOnlyLocalUnicastIPv6", o->ManageOnlyLocalUnicastIPv6);
|
||||||
GetHubAdminOptionDataAndSet(ao, "NoSpinLockForPacketDelay", &o->NoSpinLockForPacketDelay);
|
GetHubAdminOptionDataAndSet(ao, "DisableIPParsing", o->DisableIPParsing);
|
||||||
GetHubAdminOptionDataAndSet(ao, "BroadcastStormDetectionThreshold", &o->BroadcastStormDetectionThreshold);
|
GetHubAdminOptionDataAndSet(ao, "YieldAfterStorePacket", o->YieldAfterStorePacket);
|
||||||
GetHubAdminOptionDataAndSet(ao, "ClientMinimumRequiredBuild", &o->ClientMinimumRequiredBuild);
|
GetHubAdminOptionDataAndSet(ao, "NoSpinLockForPacketDelay", o->NoSpinLockForPacketDelay);
|
||||||
GetHubAdminOptionDataAndSet(ao, "FilterPPPoE", &o->FilterPPPoE);
|
GetHubAdminOptionDataAndSet(ao, "BroadcastStormDetectionThreshold", o->BroadcastStormDetectionThreshold);
|
||||||
GetHubAdminOptionDataAndSet(ao, "FilterOSPF", &o->FilterOSPF);
|
GetHubAdminOptionDataAndSet(ao, "ClientMinimumRequiredBuild", o->ClientMinimumRequiredBuild);
|
||||||
GetHubAdminOptionDataAndSet(ao, "FilterIPv4", &o->FilterIPv4);
|
GetHubAdminOptionDataAndSet(ao, "FilterPPPoE", o->FilterPPPoE);
|
||||||
GetHubAdminOptionDataAndSet(ao, "FilterIPv6", &o->FilterIPv6);
|
GetHubAdminOptionDataAndSet(ao, "FilterOSPF", o->FilterOSPF);
|
||||||
GetHubAdminOptionDataAndSet(ao, "FilterNonIP", &o->FilterNonIP);
|
GetHubAdminOptionDataAndSet(ao, "FilterIPv4", o->FilterIPv4);
|
||||||
GetHubAdminOptionDataAndSet(ao, "NoIPv4PacketLog", &o->NoIPv4PacketLog);
|
GetHubAdminOptionDataAndSet(ao, "FilterIPv6", o->FilterIPv6);
|
||||||
GetHubAdminOptionDataAndSet(ao, "NoIPv6PacketLog", &o->NoIPv6PacketLog);
|
GetHubAdminOptionDataAndSet(ao, "FilterNonIP", o->FilterNonIP);
|
||||||
GetHubAdminOptionDataAndSet(ao, "FilterBPDU", &o->FilterBPDU);
|
GetHubAdminOptionDataAndSet(ao, "NoIPv4PacketLog", o->NoIPv4PacketLog);
|
||||||
GetHubAdminOptionDataAndSet(ao, "NoIPv6DefaultRouterInRAWhenIPv6", &o->NoIPv6DefaultRouterInRAWhenIPv6);
|
GetHubAdminOptionDataAndSet(ao, "NoIPv6PacketLog", o->NoIPv6PacketLog);
|
||||||
GetHubAdminOptionDataAndSet(ao, "NoLookBPDUBridgeId", &o->NoLookBPDUBridgeId);
|
GetHubAdminOptionDataAndSet(ao, "FilterBPDU", o->FilterBPDU);
|
||||||
GetHubAdminOptionDataAndSet(ao, "NoManageVlanId", &o->NoManageVlanId);
|
GetHubAdminOptionDataAndSet(ao, "NoIPv6DefaultRouterInRAWhenIPv6", o->NoIPv6DefaultRouterInRAWhenIPv6);
|
||||||
GetHubAdminOptionDataAndSet(ao, "VlanTypeId", &o->VlanTypeId);
|
GetHubAdminOptionDataAndSet(ao, "NoLookBPDUBridgeId", o->NoLookBPDUBridgeId);
|
||||||
GetHubAdminOptionDataAndSet(ao, "FixForDLinkBPDU", &o->FixForDLinkBPDU);
|
GetHubAdminOptionDataAndSet(ao, "NoManageVlanId", o->NoManageVlanId);
|
||||||
GetHubAdminOptionDataAndSet(ao, "RequiredClientId", &o->RequiredClientId);
|
GetHubAdminOptionDataAndSet(ao, "VlanTypeId", o->VlanTypeId);
|
||||||
GetHubAdminOptionDataAndSet(ao, "AdjustTcpMssValue", &o->AdjustTcpMssValue);
|
GetHubAdminOptionDataAndSet(ao, "FixForDLinkBPDU", o->FixForDLinkBPDU);
|
||||||
GetHubAdminOptionDataAndSet(ao, "DisableAdjustTcpMss", &o->DisableAdjustTcpMss);
|
GetHubAdminOptionDataAndSet(ao, "RequiredClientId", o->RequiredClientId);
|
||||||
GetHubAdminOptionDataAndSet(ao, "NoDhcpPacketLogOutsideHub", &o->NoDhcpPacketLogOutsideHub);
|
GetHubAdminOptionDataAndSet(ao, "AdjustTcpMssValue", o->AdjustTcpMssValue);
|
||||||
GetHubAdminOptionDataAndSet(ao, "DisableHttpParsing", &o->DisableHttpParsing);
|
GetHubAdminOptionDataAndSet(ao, "DisableAdjustTcpMss", o->DisableAdjustTcpMss);
|
||||||
GetHubAdminOptionDataAndSet(ao, "DisableUdpAcceleration", &o->DisableUdpAcceleration);
|
GetHubAdminOptionDataAndSet(ao, "NoDhcpPacketLogOutsideHub", o->NoDhcpPacketLogOutsideHub);
|
||||||
GetHubAdminOptionDataAndSet(ao, "DisableUdpFilterForLocalBridgeNic", &o->DisableUdpFilterForLocalBridgeNic);
|
GetHubAdminOptionDataAndSet(ao, "DisableHttpParsing", o->DisableHttpParsing);
|
||||||
GetHubAdminOptionDataAndSet(ao, "ApplyIPv4AccessListOnArpPacket", &o->ApplyIPv4AccessListOnArpPacket);
|
GetHubAdminOptionDataAndSet(ao, "DisableUdpAcceleration", o->DisableUdpAcceleration);
|
||||||
GetHubAdminOptionDataAndSet(ao, "RemoveDefGwOnDhcpForLocalhost", &o->RemoveDefGwOnDhcpForLocalhost);
|
GetHubAdminOptionDataAndSet(ao, "DisableUdpFilterForLocalBridgeNic", o->DisableUdpFilterForLocalBridgeNic);
|
||||||
GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxTcpSessionsPerIp", &o->SecureNAT_MaxTcpSessionsPerIp);
|
GetHubAdminOptionDataAndSet(ao, "ApplyIPv4AccessListOnArpPacket", o->ApplyIPv4AccessListOnArpPacket);
|
||||||
GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxTcpSynSentPerIp", &o->SecureNAT_MaxTcpSynSentPerIp);
|
GetHubAdminOptionDataAndSet(ao, "RemoveDefGwOnDhcpForLocalhost", o->RemoveDefGwOnDhcpForLocalhost);
|
||||||
GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxUdpSessionsPerIp", &o->SecureNAT_MaxUdpSessionsPerIp);
|
GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxTcpSessionsPerIp", o->SecureNAT_MaxTcpSessionsPerIp);
|
||||||
GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxDnsSessionsPerIp", &o->SecureNAT_MaxDnsSessionsPerIp);
|
GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxTcpSynSentPerIp", o->SecureNAT_MaxTcpSynSentPerIp);
|
||||||
GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxIcmpSessionsPerIp", &o->SecureNAT_MaxIcmpSessionsPerIp);
|
GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxUdpSessionsPerIp", o->SecureNAT_MaxUdpSessionsPerIp);
|
||||||
GetHubAdminOptionDataAndSet(ao, "AccessListIncludeFileCacheLifetime", &o->AccessListIncludeFileCacheLifetime);
|
GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxDnsSessionsPerIp", o->SecureNAT_MaxDnsSessionsPerIp);
|
||||||
GetHubAdminOptionDataAndSet(ao, "DisableKernelModeSecureNAT", &o->DisableKernelModeSecureNAT);
|
GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxIcmpSessionsPerIp", o->SecureNAT_MaxIcmpSessionsPerIp);
|
||||||
GetHubAdminOptionDataAndSet(ao, "DisableIpRawModeSecureNAT", &o->DisableIpRawModeSecureNAT);
|
GetHubAdminOptionDataAndSet(ao, "AccessListIncludeFileCacheLifetime", o->AccessListIncludeFileCacheLifetime);
|
||||||
GetHubAdminOptionDataAndSet(ao, "DisableUserModeSecureNAT", &o->DisableUserModeSecureNAT);
|
GetHubAdminOptionDataAndSet(ao, "DisableKernelModeSecureNAT", o->DisableKernelModeSecureNAT);
|
||||||
GetHubAdminOptionDataAndSet(ao, "DisableCheckMacOnLocalBridge", &o->DisableCheckMacOnLocalBridge);
|
GetHubAdminOptionDataAndSet(ao, "DisableIpRawModeSecureNAT", o->DisableIpRawModeSecureNAT);
|
||||||
GetHubAdminOptionDataAndSet(ao, "DisableCorrectIpOffloadChecksum", &o->DisableCorrectIpOffloadChecksum);
|
GetHubAdminOptionDataAndSet(ao, "DisableUserModeSecureNAT", o->DisableUserModeSecureNAT);
|
||||||
GetHubAdminOptionDataAndSet(ao, "BroadcastLimiterStrictMode", &o->BroadcastLimiterStrictMode);
|
GetHubAdminOptionDataAndSet(ao, "DisableCheckMacOnLocalBridge", o->DisableCheckMacOnLocalBridge);
|
||||||
GetHubAdminOptionDataAndSet(ao, "MaxLoggedPacketsPerMinute", &o->MaxLoggedPacketsPerMinute);
|
GetHubAdminOptionDataAndSet(ao, "DisableCorrectIpOffloadChecksum", o->DisableCorrectIpOffloadChecksum);
|
||||||
GetHubAdminOptionDataAndSet(ao, "DoNotSaveHeavySecurityLogs", &o->DoNotSaveHeavySecurityLogs);
|
GetHubAdminOptionDataAndSet(ao, "BroadcastLimiterStrictMode", o->BroadcastLimiterStrictMode);
|
||||||
GetHubAdminOptionDataAndSet(ao, "DropBroadcastsInPrivacyFilterMode", &o->DropBroadcastsInPrivacyFilterMode);
|
GetHubAdminOptionDataAndSet(ao, "MaxLoggedPacketsPerMinute", o->MaxLoggedPacketsPerMinute);
|
||||||
GetHubAdminOptionDataAndSet(ao, "DropArpInPrivacyFilterMode", &o->DropArpInPrivacyFilterMode);
|
GetHubAdminOptionDataAndSet(ao, "DoNotSaveHeavySecurityLogs", o->DoNotSaveHeavySecurityLogs);
|
||||||
GetHubAdminOptionDataAndSet(ao, "SuppressClientUpdateNotification", &o->SuppressClientUpdateNotification);
|
GetHubAdminOptionDataAndSet(ao, "DropBroadcastsInPrivacyFilterMode", o->DropBroadcastsInPrivacyFilterMode);
|
||||||
GetHubAdminOptionDataAndSet(ao, "FloodingSendQueueBufferQuota", &o->FloodingSendQueueBufferQuota);
|
GetHubAdminOptionDataAndSet(ao, "DropArpInPrivacyFilterMode", o->DropArpInPrivacyFilterMode);
|
||||||
GetHubAdminOptionDataAndSet(ao, "AssignVLanIdByRadiusAttribute", &o->AssignVLanIdByRadiusAttribute);
|
GetHubAdminOptionDataAndSet(ao, "SuppressClientUpdateNotification", o->SuppressClientUpdateNotification);
|
||||||
GetHubAdminOptionDataAndSet(ao, "DenyAllRadiusLoginWithNoVlanAssign", &o->DenyAllRadiusLoginWithNoVlanAssign);
|
GetHubAdminOptionDataAndSet(ao, "FloodingSendQueueBufferQuota", o->FloodingSendQueueBufferQuota);
|
||||||
GetHubAdminOptionDataAndSet(ao, "SecureNAT_RandomizeAssignIp", &o->SecureNAT_RandomizeAssignIp);
|
GetHubAdminOptionDataAndSet(ao, "AssignVLanIdByRadiusAttribute", o->AssignVLanIdByRadiusAttribute);
|
||||||
GetHubAdminOptionDataAndSet(ao, "DetectDormantSessionInterval", &o->DetectDormantSessionInterval);
|
GetHubAdminOptionDataAndSet(ao, "DenyAllRadiusLoginWithNoVlanAssign", o->DenyAllRadiusLoginWithNoVlanAssign);
|
||||||
GetHubAdminOptionDataAndSet(ao, "NoPhysicalIPOnPacketLog", &o->NoPhysicalIPOnPacketLog);
|
GetHubAdminOptionDataAndSet(ao, "SecureNAT_RandomizeAssignIp", o->SecureNAT_RandomizeAssignIp);
|
||||||
GetHubAdminOptionDataAndSet(ao, "UseHubNameAsDhcpUserClassOption", &o->UseHubNameAsDhcpUserClassOption);
|
GetHubAdminOptionDataAndSet(ao, "DetectDormantSessionInterval", o->DetectDormantSessionInterval);
|
||||||
GetHubAdminOptionDataAndSet(ao, "UseHubNameAsRadiusNasId", &o->UseHubNameAsRadiusNasId);
|
GetHubAdminOptionDataAndSet(ao, "NoPhysicalIPOnPacketLog", o->NoPhysicalIPOnPacketLog);
|
||||||
|
GetHubAdminOptionDataAndSet(ao, "UseHubNameAsDhcpUserClassOption", o->UseHubNameAsDhcpUserClassOption);
|
||||||
|
GetHubAdminOptionDataAndSet(ao, "UseHubNameAsRadiusNasId", o->UseHubNameAsRadiusNasId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert the contents of the HUB_OPTION to data
|
// Convert the contents of the HUB_OPTION to data
|
||||||
|
@ -519,7 +519,6 @@ void HubOptionStructToData(RPC_ADMIN_OPTION *ao, HUB_OPTION *o, char *hub_name);
|
|||||||
ADMIN_OPTION *NewAdminOption(char *name, UINT value);
|
ADMIN_OPTION *NewAdminOption(char *name, UINT value);
|
||||||
void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao);
|
void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao);
|
||||||
UINT GetHubAdminOptionData(RPC_ADMIN_OPTION *ao, char *name);
|
UINT GetHubAdminOptionData(RPC_ADMIN_OPTION *ao, char *name);
|
||||||
void GetHubAdminOptionDataAndSet(RPC_ADMIN_OPTION *ao, char *name, UINT *dest);
|
|
||||||
bool IsURLMsg(wchar_t *str, char *url, UINT url_size);
|
bool IsURLMsg(wchar_t *str, char *url, UINT url_size);
|
||||||
LIST *NewUserList();
|
LIST *NewUserList();
|
||||||
void DeleteAllUserListCache(LIST *o);
|
void DeleteAllUserListCache(LIST *o);
|
||||||
|
@ -1785,7 +1785,7 @@ bool RadiusLogin(CONNECTION *c, char *server, UINT port, UCHAR *secret, UINT sec
|
|||||||
SOCK *sock;
|
SOCK *sock;
|
||||||
USHORT sz = 0;
|
USHORT sz = 0;
|
||||||
UINT pos = 0;
|
UINT pos = 0;
|
||||||
BOOL *finish = ZeroMallocEx(sizeof(BOOL) * LIST_NUM(ip_list), true);
|
bool *finish = ZeroMallocEx(sizeof(bool) * LIST_NUM(ip_list), true);
|
||||||
|
|
||||||
Zero(tmp, sizeof(tmp));
|
Zero(tmp, sizeof(tmp));
|
||||||
|
|
||||||
|
@ -9,8 +9,6 @@
|
|||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
#define WIN32COM_CPP
|
|
||||||
|
|
||||||
#define _WIN32_DCOM
|
#define _WIN32_DCOM
|
||||||
|
|
||||||
//#define _WIN32_WINNT 0x0502
|
//#define _WIN32_WINNT 0x0502
|
||||||
@ -284,11 +282,11 @@ bool InstallNdisProtocolDriver(wchar_t *inf_path, wchar_t *id, UINT lock_timeout
|
|||||||
}
|
}
|
||||||
|
|
||||||
_SetupCopyOEMInfW =
|
_SetupCopyOEMInfW =
|
||||||
(UINT (__stdcall *)(PCWSTR,PCWSTR,DWORD,DWORD,PWSTR,DWORD,PDWORD,PWSTR *))
|
(BOOL (__stdcall *)(PCWSTR,PCWSTR,DWORD,DWORD,PWSTR,DWORD,PDWORD,PWSTR *))
|
||||||
GetProcAddress(hSetupApiDll, "SetupCopyOEMInfW");
|
GetProcAddress(hSetupApiDll, "SetupCopyOEMInfW");
|
||||||
|
|
||||||
_SetupUninstallOEMInfW =
|
_SetupUninstallOEMInfW =
|
||||||
(UINT (__stdcall *)(PCWSTR,DWORD,PVOID))
|
(BOOL (__stdcall *)(PCWSTR,DWORD,PVOID))
|
||||||
GetProcAddress(hSetupApiDll, "SetupUninstallOEMInfW");
|
GetProcAddress(hSetupApiDll, "SetupUninstallOEMInfW");
|
||||||
|
|
||||||
if (_SetupCopyOEMInfW == NULL || _SetupUninstallOEMInfW == NULL)
|
if (_SetupCopyOEMInfW == NULL || _SetupUninstallOEMInfW == NULL)
|
||||||
|
@ -8,12 +8,6 @@
|
|||||||
#ifndef WIN32COM_H
|
#ifndef WIN32COM_H
|
||||||
#define WIN32COM_H
|
#define WIN32COM_H
|
||||||
|
|
||||||
#ifdef WIN32COM_CPP
|
|
||||||
|
|
||||||
// Internal function
|
|
||||||
|
|
||||||
#endif // WIN32COM_CPP
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
|
@ -35,9 +35,6 @@
|
|||||||
#undef StrCmp
|
#undef StrCmp
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define WIN32COM_CPP
|
|
||||||
|
|
||||||
//#define _WIN32_WINNT 0x0502
|
//#define _WIN32_WINNT 0x0502
|
||||||
//#define WINVER 0x0502
|
//#define WINVER 0x0502
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#ifndef MAYATYPE_H
|
#ifndef MAYATYPE_H
|
||||||
#define MAYATYPE_H
|
#define MAYATYPE_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
// Check whether the windows.h header is included
|
// Check whether the windows.h header is included
|
||||||
@ -172,13 +173,6 @@ typedef int PID;
|
|||||||
typedef unsigned long PID;
|
typedef unsigned long PID;
|
||||||
#endif // WINDOWS_H
|
#endif // WINDOWS_H
|
||||||
|
|
||||||
// TODO: include <stdbool.h> instead of manually defining type
|
|
||||||
#ifndef WIN32COM_CPP
|
|
||||||
typedef unsigned int bool;
|
|
||||||
#define true 1
|
|
||||||
#define false 0
|
|
||||||
#endif // WIN32COM_CPP
|
|
||||||
|
|
||||||
typedef int64_t time_64t;
|
typedef int64_t time_64t;
|
||||||
|
|
||||||
#ifndef _BASETSD_H_
|
#ifndef _BASETSD_H_
|
||||||
|
@ -1430,11 +1430,11 @@ bool PackGetStrEx(PACK *p, char *name, char *str, UINT size, UINT index)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the string size from the PACK
|
// Get the string size from the PACK
|
||||||
bool PackGetStrSize(PACK *p, char *name)
|
UINT PackGetStrSize(PACK *p, char *name)
|
||||||
{
|
{
|
||||||
return PackGetStrSizeEx(p, name, 0);
|
return PackGetStrSizeEx(p, name, 0);
|
||||||
}
|
}
|
||||||
bool PackGetStrSizeEx(PACK *p, char *name, UINT index)
|
UINT PackGetStrSizeEx(PACK *p, char *name, UINT index)
|
||||||
{
|
{
|
||||||
ELEMENT *e;
|
ELEMENT *e;
|
||||||
// Validate arguments
|
// Validate arguments
|
||||||
|
@ -143,8 +143,8 @@ ELEMENT *PackAddData(PACK *p, char *name, void *data, UINT size);
|
|||||||
ELEMENT *PackAddDataEx(PACK *p, char *name, void *data, UINT size, UINT index, UINT total);
|
ELEMENT *PackAddDataEx(PACK *p, char *name, void *data, UINT size, UINT index, UINT total);
|
||||||
ELEMENT *PackAddBuf(PACK *p, char *name, BUF *b);
|
ELEMENT *PackAddBuf(PACK *p, char *name, BUF *b);
|
||||||
ELEMENT *PackAddBufEx(PACK *p, char *name, BUF *b, UINT index, UINT total);
|
ELEMENT *PackAddBufEx(PACK *p, char *name, BUF *b, UINT index, UINT total);
|
||||||
bool PackGetStrSize(PACK *p, char *name);
|
UINT PackGetStrSize(PACK *p, char *name);
|
||||||
bool PackGetStrSizeEx(PACK *p, char *name, UINT index);
|
UINT PackGetStrSizeEx(PACK *p, char *name, UINT index);
|
||||||
bool PackGetStr(PACK *p, char *name, char *str, UINT size);
|
bool PackGetStr(PACK *p, char *name, char *str, UINT size);
|
||||||
bool PackGetStrEx(PACK *p, char *name, char *str, UINT size, UINT index);
|
bool PackGetStrEx(PACK *p, char *name, char *str, UINT size, UINT index);
|
||||||
bool PackGetUniStr(PACK *p, char *name, wchar_t *unistr, UINT size);
|
bool PackGetUniStr(PACK *p, char *name, wchar_t *unistr, UINT size);
|
||||||
|
Loading…
Reference in New Issue
Block a user