diff --git a/src/Cedar/CMInner.h b/src/Cedar/CMInner.h index 90fec6d5..f1169da6 100644 --- a/src/Cedar/CMInner.h +++ b/src/Cedar/CMInner.h @@ -379,7 +379,7 @@ void CmPolicyDlg(HWND hWnd, CM_STATUS *st); UINT CmPolicyDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam, void *param); void CmPolicyDlgPrint(HWND hWnd, CM_POLICY *p); 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 CmEditAccount(HWND hWnd, wchar_t *account_name); void CmGenerateNewAccountName(HWND hWnd, wchar_t *name, UINT size); diff --git a/src/Cedar/Cedar.h b/src/Cedar/Cedar.h index 6d2f6b23..6f9ba13c 100644 --- a/src/Cedar/Cedar.h +++ b/src/Cedar/Cedar.h @@ -24,10 +24,6 @@ #endif // VPN_SPEED -#define bool UINT -#define BOOL UINT - - // Version number #ifndef CEDAR_VERSION_MAJOR #define CEDAR_VERSION_MAJOR 0 diff --git a/src/Cedar/Command.c b/src/Cedar/Command.c index c11455cc..99b83dce 100644 --- a/src/Cedar/Command.c +++ b/src/Cedar/Command.c @@ -23025,7 +23025,7 @@ void CtEscapeCsv(wchar_t *dst, UINT size, wchar_t *src){ UINT i; UINT len = UniStrLen(src); UINT idx; - BOOL need_to_escape = false; + bool need_to_escape = false; wchar_t tmp[2]=L"*"; // Check the input value diff --git a/src/Cedar/Connection.h b/src/Cedar/Connection.h index c846ddeb..04223f94 100644 --- a/src/Cedar/Connection.h +++ b/src/Cedar/Connection.h @@ -149,7 +149,7 @@ struct UDP // Data block struct BLOCK { - BOOL Compressed; // Compression flag + bool Compressed; // Compression flag UINT Size; // Block size UINT SizeofData; // Data size UCHAR *Buf; // Buffer diff --git a/src/Cedar/EtherLog.h b/src/Cedar/EtherLog.h index 15800b41..ba3db161 100644 --- a/src/Cedar/EtherLog.h +++ b/src/Cedar/EtherLog.h @@ -51,7 +51,7 @@ struct RPC_ENUM_DEVICE // License status of the service struct RPC_EL_LICENSE_STATUS { - BOOL Valid; // Enable flag + bool Valid; // Enable flag UINT64 SystemId; // System ID UINT64 SystemExpires; // System expiration date }; @@ -74,7 +74,7 @@ struct EL_DEVICE // License status struct EL_LICENSE_STATUS { - BOOL Valid; // Enable flag + bool Valid; // Enable flag UINT64 SystemId; // System ID UINT64 Expires; // Expiration date }; diff --git a/src/Cedar/Hub.c b/src/Cedar/Hub.c index 184f3312..ac36052a 100644 --- a/src/Cedar/Hub.c +++ b/src/Cedar/Hub.c @@ -7,6 +7,13 @@ #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 char vgs_ua_str[9] = {0}; static bool g_vgs_emb_tag = false; @@ -516,23 +523,6 @@ UINT GetHubAdminOptionData(RPC_ADMIN_OPTION *ao, char *name) 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 void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao) @@ -543,64 +533,66 @@ void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao) return; } - GetHubAdminOptionDataAndSet(ao, "NoAddressPollingIPv4", &o->NoArpPolling); - GetHubAdminOptionDataAndSet(ao, "NoAddressPollingIPv6", &o->NoIPv6AddrPolling); - GetHubAdminOptionDataAndSet(ao, "NoIpTable", &o->NoIpTable); - GetHubAdminOptionDataAndSet(ao, "NoMacAddressLog", &o->NoMacAddressLog); - GetHubAdminOptionDataAndSet(ao, "ManageOnlyPrivateIP", &o->ManageOnlyPrivateIP); - GetHubAdminOptionDataAndSet(ao, "ManageOnlyLocalUnicastIPv6", &o->ManageOnlyLocalUnicastIPv6); - GetHubAdminOptionDataAndSet(ao, "DisableIPParsing", &o->DisableIPParsing); - GetHubAdminOptionDataAndSet(ao, "YieldAfterStorePacket", &o->YieldAfterStorePacket); - GetHubAdminOptionDataAndSet(ao, "NoSpinLockForPacketDelay", &o->NoSpinLockForPacketDelay); - GetHubAdminOptionDataAndSet(ao, "BroadcastStormDetectionThreshold", &o->BroadcastStormDetectionThreshold); - GetHubAdminOptionDataAndSet(ao, "ClientMinimumRequiredBuild", &o->ClientMinimumRequiredBuild); - GetHubAdminOptionDataAndSet(ao, "FilterPPPoE", &o->FilterPPPoE); - GetHubAdminOptionDataAndSet(ao, "FilterOSPF", &o->FilterOSPF); - GetHubAdminOptionDataAndSet(ao, "FilterIPv4", &o->FilterIPv4); - GetHubAdminOptionDataAndSet(ao, "FilterIPv6", &o->FilterIPv6); - GetHubAdminOptionDataAndSet(ao, "FilterNonIP", &o->FilterNonIP); - GetHubAdminOptionDataAndSet(ao, "NoIPv4PacketLog", &o->NoIPv4PacketLog); - GetHubAdminOptionDataAndSet(ao, "NoIPv6PacketLog", &o->NoIPv6PacketLog); - GetHubAdminOptionDataAndSet(ao, "FilterBPDU", &o->FilterBPDU); - GetHubAdminOptionDataAndSet(ao, "NoIPv6DefaultRouterInRAWhenIPv6", &o->NoIPv6DefaultRouterInRAWhenIPv6); - GetHubAdminOptionDataAndSet(ao, "NoLookBPDUBridgeId", &o->NoLookBPDUBridgeId); - GetHubAdminOptionDataAndSet(ao, "NoManageVlanId", &o->NoManageVlanId); - GetHubAdminOptionDataAndSet(ao, "VlanTypeId", &o->VlanTypeId); - GetHubAdminOptionDataAndSet(ao, "FixForDLinkBPDU", &o->FixForDLinkBPDU); - GetHubAdminOptionDataAndSet(ao, "RequiredClientId", &o->RequiredClientId); - GetHubAdminOptionDataAndSet(ao, "AdjustTcpMssValue", &o->AdjustTcpMssValue); - GetHubAdminOptionDataAndSet(ao, "DisableAdjustTcpMss", &o->DisableAdjustTcpMss); - GetHubAdminOptionDataAndSet(ao, "NoDhcpPacketLogOutsideHub", &o->NoDhcpPacketLogOutsideHub); - GetHubAdminOptionDataAndSet(ao, "DisableHttpParsing", &o->DisableHttpParsing); - GetHubAdminOptionDataAndSet(ao, "DisableUdpAcceleration", &o->DisableUdpAcceleration); - GetHubAdminOptionDataAndSet(ao, "DisableUdpFilterForLocalBridgeNic", &o->DisableUdpFilterForLocalBridgeNic); - GetHubAdminOptionDataAndSet(ao, "ApplyIPv4AccessListOnArpPacket", &o->ApplyIPv4AccessListOnArpPacket); - GetHubAdminOptionDataAndSet(ao, "RemoveDefGwOnDhcpForLocalhost", &o->RemoveDefGwOnDhcpForLocalhost); - GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxTcpSessionsPerIp", &o->SecureNAT_MaxTcpSessionsPerIp); - GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxTcpSynSentPerIp", &o->SecureNAT_MaxTcpSynSentPerIp); - GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxUdpSessionsPerIp", &o->SecureNAT_MaxUdpSessionsPerIp); - GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxDnsSessionsPerIp", &o->SecureNAT_MaxDnsSessionsPerIp); - GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxIcmpSessionsPerIp", &o->SecureNAT_MaxIcmpSessionsPerIp); - GetHubAdminOptionDataAndSet(ao, "AccessListIncludeFileCacheLifetime", &o->AccessListIncludeFileCacheLifetime); - GetHubAdminOptionDataAndSet(ao, "DisableKernelModeSecureNAT", &o->DisableKernelModeSecureNAT); - GetHubAdminOptionDataAndSet(ao, "DisableIpRawModeSecureNAT", &o->DisableIpRawModeSecureNAT); - GetHubAdminOptionDataAndSet(ao, "DisableUserModeSecureNAT", &o->DisableUserModeSecureNAT); - GetHubAdminOptionDataAndSet(ao, "DisableCheckMacOnLocalBridge", &o->DisableCheckMacOnLocalBridge); - GetHubAdminOptionDataAndSet(ao, "DisableCorrectIpOffloadChecksum", &o->DisableCorrectIpOffloadChecksum); - GetHubAdminOptionDataAndSet(ao, "BroadcastLimiterStrictMode", &o->BroadcastLimiterStrictMode); - GetHubAdminOptionDataAndSet(ao, "MaxLoggedPacketsPerMinute", &o->MaxLoggedPacketsPerMinute); - GetHubAdminOptionDataAndSet(ao, "DoNotSaveHeavySecurityLogs", &o->DoNotSaveHeavySecurityLogs); - GetHubAdminOptionDataAndSet(ao, "DropBroadcastsInPrivacyFilterMode", &o->DropBroadcastsInPrivacyFilterMode); - GetHubAdminOptionDataAndSet(ao, "DropArpInPrivacyFilterMode", &o->DropArpInPrivacyFilterMode); - GetHubAdminOptionDataAndSet(ao, "SuppressClientUpdateNotification", &o->SuppressClientUpdateNotification); - GetHubAdminOptionDataAndSet(ao, "FloodingSendQueueBufferQuota", &o->FloodingSendQueueBufferQuota); - GetHubAdminOptionDataAndSet(ao, "AssignVLanIdByRadiusAttribute", &o->AssignVLanIdByRadiusAttribute); - GetHubAdminOptionDataAndSet(ao, "DenyAllRadiusLoginWithNoVlanAssign", &o->DenyAllRadiusLoginWithNoVlanAssign); - GetHubAdminOptionDataAndSet(ao, "SecureNAT_RandomizeAssignIp", &o->SecureNAT_RandomizeAssignIp); - GetHubAdminOptionDataAndSet(ao, "DetectDormantSessionInterval", &o->DetectDormantSessionInterval); - GetHubAdminOptionDataAndSet(ao, "NoPhysicalIPOnPacketLog", &o->NoPhysicalIPOnPacketLog); - GetHubAdminOptionDataAndSet(ao, "UseHubNameAsDhcpUserClassOption", &o->UseHubNameAsDhcpUserClassOption); - GetHubAdminOptionDataAndSet(ao, "UseHubNameAsRadiusNasId", &o->UseHubNameAsRadiusNasId); + UINT value; + + GetHubAdminOptionDataAndSet(ao, "NoAddressPollingIPv4", o->NoArpPolling); + GetHubAdminOptionDataAndSet(ao, "NoAddressPollingIPv6", o->NoIPv6AddrPolling); + GetHubAdminOptionDataAndSet(ao, "NoIpTable", o->NoIpTable); + GetHubAdminOptionDataAndSet(ao, "NoMacAddressLog", o->NoMacAddressLog); + GetHubAdminOptionDataAndSet(ao, "ManageOnlyPrivateIP", o->ManageOnlyPrivateIP); + GetHubAdminOptionDataAndSet(ao, "ManageOnlyLocalUnicastIPv6", o->ManageOnlyLocalUnicastIPv6); + GetHubAdminOptionDataAndSet(ao, "DisableIPParsing", o->DisableIPParsing); + GetHubAdminOptionDataAndSet(ao, "YieldAfterStorePacket", o->YieldAfterStorePacket); + GetHubAdminOptionDataAndSet(ao, "NoSpinLockForPacketDelay", o->NoSpinLockForPacketDelay); + GetHubAdminOptionDataAndSet(ao, "BroadcastStormDetectionThreshold", o->BroadcastStormDetectionThreshold); + GetHubAdminOptionDataAndSet(ao, "ClientMinimumRequiredBuild", o->ClientMinimumRequiredBuild); + GetHubAdminOptionDataAndSet(ao, "FilterPPPoE", o->FilterPPPoE); + GetHubAdminOptionDataAndSet(ao, "FilterOSPF", o->FilterOSPF); + GetHubAdminOptionDataAndSet(ao, "FilterIPv4", o->FilterIPv4); + GetHubAdminOptionDataAndSet(ao, "FilterIPv6", o->FilterIPv6); + GetHubAdminOptionDataAndSet(ao, "FilterNonIP", o->FilterNonIP); + GetHubAdminOptionDataAndSet(ao, "NoIPv4PacketLog", o->NoIPv4PacketLog); + GetHubAdminOptionDataAndSet(ao, "NoIPv6PacketLog", o->NoIPv6PacketLog); + GetHubAdminOptionDataAndSet(ao, "FilterBPDU", o->FilterBPDU); + GetHubAdminOptionDataAndSet(ao, "NoIPv6DefaultRouterInRAWhenIPv6", o->NoIPv6DefaultRouterInRAWhenIPv6); + GetHubAdminOptionDataAndSet(ao, "NoLookBPDUBridgeId", o->NoLookBPDUBridgeId); + GetHubAdminOptionDataAndSet(ao, "NoManageVlanId", o->NoManageVlanId); + GetHubAdminOptionDataAndSet(ao, "VlanTypeId", o->VlanTypeId); + GetHubAdminOptionDataAndSet(ao, "FixForDLinkBPDU", o->FixForDLinkBPDU); + GetHubAdminOptionDataAndSet(ao, "RequiredClientId", o->RequiredClientId); + GetHubAdminOptionDataAndSet(ao, "AdjustTcpMssValue", o->AdjustTcpMssValue); + GetHubAdminOptionDataAndSet(ao, "DisableAdjustTcpMss", o->DisableAdjustTcpMss); + GetHubAdminOptionDataAndSet(ao, "NoDhcpPacketLogOutsideHub", o->NoDhcpPacketLogOutsideHub); + GetHubAdminOptionDataAndSet(ao, "DisableHttpParsing", o->DisableHttpParsing); + GetHubAdminOptionDataAndSet(ao, "DisableUdpAcceleration", o->DisableUdpAcceleration); + GetHubAdminOptionDataAndSet(ao, "DisableUdpFilterForLocalBridgeNic", o->DisableUdpFilterForLocalBridgeNic); + GetHubAdminOptionDataAndSet(ao, "ApplyIPv4AccessListOnArpPacket", o->ApplyIPv4AccessListOnArpPacket); + GetHubAdminOptionDataAndSet(ao, "RemoveDefGwOnDhcpForLocalhost", o->RemoveDefGwOnDhcpForLocalhost); + GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxTcpSessionsPerIp", o->SecureNAT_MaxTcpSessionsPerIp); + GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxTcpSynSentPerIp", o->SecureNAT_MaxTcpSynSentPerIp); + GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxUdpSessionsPerIp", o->SecureNAT_MaxUdpSessionsPerIp); + GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxDnsSessionsPerIp", o->SecureNAT_MaxDnsSessionsPerIp); + GetHubAdminOptionDataAndSet(ao, "SecureNAT_MaxIcmpSessionsPerIp", o->SecureNAT_MaxIcmpSessionsPerIp); + GetHubAdminOptionDataAndSet(ao, "AccessListIncludeFileCacheLifetime", o->AccessListIncludeFileCacheLifetime); + GetHubAdminOptionDataAndSet(ao, "DisableKernelModeSecureNAT", o->DisableKernelModeSecureNAT); + GetHubAdminOptionDataAndSet(ao, "DisableIpRawModeSecureNAT", o->DisableIpRawModeSecureNAT); + GetHubAdminOptionDataAndSet(ao, "DisableUserModeSecureNAT", o->DisableUserModeSecureNAT); + GetHubAdminOptionDataAndSet(ao, "DisableCheckMacOnLocalBridge", o->DisableCheckMacOnLocalBridge); + GetHubAdminOptionDataAndSet(ao, "DisableCorrectIpOffloadChecksum", o->DisableCorrectIpOffloadChecksum); + GetHubAdminOptionDataAndSet(ao, "BroadcastLimiterStrictMode", o->BroadcastLimiterStrictMode); + GetHubAdminOptionDataAndSet(ao, "MaxLoggedPacketsPerMinute", o->MaxLoggedPacketsPerMinute); + GetHubAdminOptionDataAndSet(ao, "DoNotSaveHeavySecurityLogs", o->DoNotSaveHeavySecurityLogs); + GetHubAdminOptionDataAndSet(ao, "DropBroadcastsInPrivacyFilterMode", o->DropBroadcastsInPrivacyFilterMode); + GetHubAdminOptionDataAndSet(ao, "DropArpInPrivacyFilterMode", o->DropArpInPrivacyFilterMode); + GetHubAdminOptionDataAndSet(ao, "SuppressClientUpdateNotification", o->SuppressClientUpdateNotification); + GetHubAdminOptionDataAndSet(ao, "FloodingSendQueueBufferQuota", o->FloodingSendQueueBufferQuota); + GetHubAdminOptionDataAndSet(ao, "AssignVLanIdByRadiusAttribute", o->AssignVLanIdByRadiusAttribute); + GetHubAdminOptionDataAndSet(ao, "DenyAllRadiusLoginWithNoVlanAssign", o->DenyAllRadiusLoginWithNoVlanAssign); + GetHubAdminOptionDataAndSet(ao, "SecureNAT_RandomizeAssignIp", o->SecureNAT_RandomizeAssignIp); + GetHubAdminOptionDataAndSet(ao, "DetectDormantSessionInterval", o->DetectDormantSessionInterval); + GetHubAdminOptionDataAndSet(ao, "NoPhysicalIPOnPacketLog", o->NoPhysicalIPOnPacketLog); + GetHubAdminOptionDataAndSet(ao, "UseHubNameAsDhcpUserClassOption", o->UseHubNameAsDhcpUserClassOption); + GetHubAdminOptionDataAndSet(ao, "UseHubNameAsRadiusNasId", o->UseHubNameAsRadiusNasId); } // Convert the contents of the HUB_OPTION to data diff --git a/src/Cedar/Hub.h b/src/Cedar/Hub.h index 2c2dc66a..8d077f35 100644 --- a/src/Cedar/Hub.h +++ b/src/Cedar/Hub.h @@ -519,7 +519,6 @@ void HubOptionStructToData(RPC_ADMIN_OPTION *ao, HUB_OPTION *o, char *hub_name); ADMIN_OPTION *NewAdminOption(char *name, UINT value); void DataToHubOptionStruct(HUB_OPTION *o, RPC_ADMIN_OPTION *ao); 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); LIST *NewUserList(); void DeleteAllUserListCache(LIST *o); diff --git a/src/Cedar/Radius.c b/src/Cedar/Radius.c index 58c4edbf..e5f143b8 100644 --- a/src/Cedar/Radius.c +++ b/src/Cedar/Radius.c @@ -1785,7 +1785,7 @@ bool RadiusLogin(CONNECTION *c, char *server, UINT port, UCHAR *secret, UINT sec SOCK *sock; USHORT sz = 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)); diff --git a/src/Cedar/Win32Com.cpp b/src/Cedar/Win32Com.cpp index 1ad44759..9d0cdcb8 100644 --- a/src/Cedar/Win32Com.cpp +++ b/src/Cedar/Win32Com.cpp @@ -9,8 +9,6 @@ #ifdef WIN32 -#define WIN32COM_CPP - #define _WIN32_DCOM //#define _WIN32_WINNT 0x0502 @@ -284,11 +282,11 @@ bool InstallNdisProtocolDriver(wchar_t *inf_path, wchar_t *id, UINT lock_timeout } _SetupCopyOEMInfW = - (UINT (__stdcall *)(PCWSTR,PCWSTR,DWORD,DWORD,PWSTR,DWORD,PDWORD,PWSTR *)) + (BOOL (__stdcall *)(PCWSTR,PCWSTR,DWORD,DWORD,PWSTR,DWORD,PDWORD,PWSTR *)) GetProcAddress(hSetupApiDll, "SetupCopyOEMInfW"); _SetupUninstallOEMInfW = - (UINT (__stdcall *)(PCWSTR,DWORD,PVOID)) + (BOOL (__stdcall *)(PCWSTR,DWORD,PVOID)) GetProcAddress(hSetupApiDll, "SetupUninstallOEMInfW"); if (_SetupCopyOEMInfW == NULL || _SetupUninstallOEMInfW == NULL) diff --git a/src/Cedar/Win32Com.h b/src/Cedar/Win32Com.h index 9baa3a27..271d35e1 100644 --- a/src/Cedar/Win32Com.h +++ b/src/Cedar/Win32Com.h @@ -8,12 +8,6 @@ #ifndef WIN32COM_H #define WIN32COM_H -#ifdef WIN32COM_CPP - -// Internal function - -#endif // WIN32COM_CPP - #if defined(__cplusplus) extern "C" { diff --git a/src/Cedar/WinJumpList.cpp b/src/Cedar/WinJumpList.cpp index 2964aaf2..d3feedbc 100644 --- a/src/Cedar/WinJumpList.cpp +++ b/src/Cedar/WinJumpList.cpp @@ -35,9 +35,6 @@ #undef StrCmp #endif - -#define WIN32COM_CPP - //#define _WIN32_WINNT 0x0502 //#define WINVER 0x0502 #include diff --git a/src/Mayaqua/MayaType.h b/src/Mayaqua/MayaType.h index d5334c3a..433b7483 100644 --- a/src/Mayaqua/MayaType.h +++ b/src/Mayaqua/MayaType.h @@ -8,6 +8,7 @@ #ifndef MAYATYPE_H #define MAYATYPE_H +#include #include // Check whether the windows.h header is included @@ -172,13 +173,6 @@ typedef int PID; typedef unsigned long PID; #endif // WINDOWS_H -// TODO: include 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; #ifndef _BASETSD_H_ diff --git a/src/Mayaqua/Pack.c b/src/Mayaqua/Pack.c index 5c11061f..f561b72c 100644 --- a/src/Mayaqua/Pack.c +++ b/src/Mayaqua/Pack.c @@ -1430,11 +1430,11 @@ bool PackGetStrEx(PACK *p, char *name, char *str, UINT size, UINT index) } // Get the string size from the PACK -bool PackGetStrSize(PACK *p, char *name) +UINT PackGetStrSize(PACK *p, char *name) { return PackGetStrSizeEx(p, name, 0); } -bool PackGetStrSizeEx(PACK *p, char *name, UINT index) +UINT PackGetStrSizeEx(PACK *p, char *name, UINT index) { ELEMENT *e; // Validate arguments diff --git a/src/Mayaqua/Pack.h b/src/Mayaqua/Pack.h index 2260d4cd..319b9079 100644 --- a/src/Mayaqua/Pack.h +++ b/src/Mayaqua/Pack.h @@ -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 *PackAddBuf(PACK *p, char *name, BUF *b); ELEMENT *PackAddBufEx(PACK *p, char *name, BUF *b, UINT index, UINT total); -bool PackGetStrSize(PACK *p, char *name); -bool PackGetStrSizeEx(PACK *p, char *name, UINT index); +UINT PackGetStrSize(PACK *p, char *name); +UINT PackGetStrSizeEx(PACK *p, char *name, UINT index); bool PackGetStr(PACK *p, char *name, char *str, UINT size); bool PackGetStrEx(PACK *p, char *name, char *str, UINT size, UINT index); bool PackGetUniStr(PACK *p, char *name, wchar_t *unistr, UINT size);