DWORD dwRealCount = 0, dwLength;
for (pszString = pValData->pszString; *pszString; pszString += dwLength)
{
- dwLength = _tcslen (pszString) + 1;
+ dwLength = (DWORD) _tcslen (pszString) + 1;
dwRealCount++;
}
if (dwCount >= dwRealCount)
LPTSTR *pszDstString = pszStrings;
for (LPCTSTR pszString = pValData->pszString; *pszString; pszString += dwLength, pszDstString++)
{
- dwLength = _tcslen (pszString) + 1;
+ dwLength = (DWORD) _tcslen (pszString) + 1;
LPTSTR pszNewString = (LPTSTR) malloc (dwLength);
*pszDstString = pszNewString;
if (pszNewString)
DWORD dwRealCount = 0, dwLength;
for (pszString = pValData->pszString; *pszString; pszString += dwLength)
{
- dwLength = _tcslen (pszString) + 1;
+ dwLength = (DWORD) _tcslen (pszString) + 1;
dwRealCount++;
}
LPTSTR *pszNewStrings = (LPTSTR *) malloc (dwRealCount *sizeof (LPTSTR));
*pdwCount = dwRealCount;
for (pszString = pValData->pszString; *pszString; pszString += dwLength, pszNewStrings++)
{
- dwLength = _tcslen (pszString) + 1;
+ dwLength = (DWORD) _tcslen (pszString) + 1;
LPTSTR pszNewString = (LPTSTR) malloc (dwLength);
*pszNewStrings = pszNewString;
if (pszNewString)
RegValSetString (RegVal *pValData, LPCTSTR pszString)
{
ASSERT (pValData &&pszString);
- DWORD dwLength = _tcslen (pszString) + 1;
+ DWORD dwLength = (DWORD) _tcslen (pszString) + 1;
pValData->pszString = (LPTSTR) malloc (dwLength);
if (pValData->pszString)
{
{
for (i = 0; i < dwCount; i++)
{
- dwSize += _tcslen (pszStrings[i]) + 1;
+ dwSize += (DWORD) _tcslen (pszStrings[i]) + 1;
}
}
else
RegValSetStringArr (RegVal *pValData, const CStringArray &arrString)
{
ASSERT (pValData);
- DWORD i, dwSize = 1, dwCount = arrString.GetSize ();
+ DWORD i, dwSize = 1, dwCount = (DWORD) arrString.GetSize ();
if (dwCount)
{
for (i = 0; i < dwCount; i++)
HKEY hSubKey = pszSubKey ? RegCreate (hKey, pszSubKey, KEY_WRITE) : hKey;
if (hSubKey)
{
- if (RegSetValueEx (hSubKey, pszValName, 0, REG_SZ, (LPBYTE) pszString, _tcslen (pszString) + 1) == ERROR_SUCCESS)
+ if (RegSetValueEx (hSubKey, pszValName, 0, REG_SZ, (LPBYTE) pszString, (DWORD)_tcslen (pszString) + 1) == ERROR_SUCCESS)
{
if (hSubKey != hKey)
RegClose (hSubKey);