Just FYI, the __vfptr = CXX0030 thing is because the debugger thinks that d3ddev is pointing to an actual instance of a D3D device, if there's some error in the call to CreateDevice, and for whatever reason the device isn't created, then the pointer doesn't get assigned a value, and it'll have an 'undefined' value (since you don't initialize the pointer to anything). Basically, if you declare & initialize d3ddev like:
LPDIRECT3DDEVICE9 d3ddev = NULL;
Then, should the CreateDevice call fail to initialize that variable, the debugger will give a less confusing message, i.e. it will report d3ddev as still being NULL (and it shouldn't try to dereference it and complain about a bad virtual function table, which is what that __vfptr is all about)