Not sure if I have the correct syntax; my code is working, just want to run it past anyone that would like to comment to help improve it. I assume that allocating 20480 is not consuming any space because it's just an array of pointers? So I can make it go to any number that is larger than dwStringsFound?
struct sArray {
TCHAR *sName;
}*sKeys[20480];
// get dwStringsFound...
[...]
// allocate the space
for (DWORD i=0;i<dwStringsFound;i++) sKeys[i] = (sArray *) calloc(1,sizeof(sArray));
for (DWORD i=0;i<dwStringsFound;i++) sKeys[i]->sName = tcalloc(1024);
// Do work...
[...]
// Free resources.
for (DWORD i=0;i<dwStringsFound;i++) {
free(sKeys[i]->sName);sKeys[i]->sName=NULL;
free(sKeys[i]);sKeys[i]=NULL;
}