If this really is a simple timeout, and for whatever reason you are unable to increase the VISA timeout just add a delay between the write and read calls.
something like
int data[1024];
viPrintf(vi, ":WAV:DATA?", VI_NULL);
Sleep(100);
viScanf(vi, "%,1024d", data);