return (DWORD)-1;
memset(&pNewSlots[pStringTable->dwMaxSlots], 0, sizeof(TABLE_SLOT) * (dwNewMaxSlots - pStringTable->dwMaxSlots));
memcpy(pNewSlots, pStringTable->pSlots, sizeof(TABLE_SLOT) * pStringTable->dwMaxSlots);
- pNewSlots = InterlockedExchangePointer(&pStringTable->pSlots, pNewSlots);
+ pNewSlots = InterlockedExchangePointer((PVOID*)&pStringTable->pSlots, pNewSlots);
MyFree(pNewSlots);
pStringTable->dwMaxSlots = dwNewMaxSlots;
return FALSE;
}
- dwLength = (lstrlenW(pStringTable->pSlots[dwId - 1].pString) + 1) * sizeof(WCHAR);
+ dwLength = (lstrlenW(pStringTable->pSlots[dwId - 1].pString) + 1);
if (dwLength <= *lpBufferLength)
{
lstrcpyW(lpBuffer, pStringTable->pSlots[dwId - 1].pString);