I took a quick look at your code. Code :
while( S_FALSE == pVCacheQuery->GetData( &VCacheStats, sizeof( D3DDEVINFO_VCACHE ), D3DGETDATA_FLUSH ) );
Bad, bad.. :)
This is might end up as an endless loop, try running it like 16 times or so, but you should never ever do things like this. :)
Sounds like a plan... ;)
This is starting to sound and look very very interesting, I´ll be waiting. I love RPG´s but there hasn´t been very good ones in ages, I just love Fallout 2, Baldur´s Gate I.