- if ((DWORD)(Pool) >= 4) {
 ERR("(%p) Called with invalid pool type\n", This);return D3DERR_INVALIDCALL;- }
 
You could use if(Pool != D3DPOOL_DEFAULT && Pool != MANAGED ...) instead of comparing to the arbitary value "4". The compiler should figure that out and generate a >= 4 for better efficiency, but even if not it doesn't hurt because Create* isn't performance critical.