   Device values do not carry between classes.
  Okay I'm using DirectX and I have several classes that need to use the device so the device has its own class so every other class could call on that device.This is where it's breaking; I call on the class using the class name like for example:DeviceClass *Device;then I use that Device class I created to use the values from that class like this:Device->d3dDevice->SetRenderState(....but the weird thing is the device is never created even though I created in the Device class even weirder when I put a break point in the Device class after the device is created it has values in that class but when I use it outside that class it breaks.I know this might be an easier answer so please bare with me.FYI I categorized this as a C++ problem then a DirectX problem because I think I’m transferring the values incorrectly not anything really to do with DirectX.Thanks for any help.   
  Sounds like your having more than one device object. Could you post some code, maybe the device constructor (if its your own object) and where you set this device in some of the other classes.   ;  ////////// This is from Device.h/////class Device{public:Device(void);~Device(void);D3DPRESENT_PARAMETERS d3dpp;IDirect3DDevice9*gd3dDevice;// D3D DeviceIDirect3D9*md3dObject; // D3D ObjectLPDIRECT3DVERTEXBUFFER9 t_buffer;// the pointer to the particle's vertex buffervoid Init(HWND hWnd, HINSTANCE hInst,int nWidth, int nHeight, bool bWindowed);};////////// This is from Device.cpp/////void Device::Init(HWND hWnd, HINSTANCE hInst, int nWidth, int nHeight, bool bWindowed){// Create the D3D Objectmd3dObject = Direct3DCreate9(D3D_SDK_VERSION);// Verifying HAL Support//IDirect3D9::CheckDeviceType(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFORMAT, D3DFORMAT, true);// The device's parametersZeroMemory( &d3dpp, sizeof( d3dpp ) );// Set Parametersd3dpp.Windowed=true;d3dpp.SwapEffect=D3DSWAPEFFECT_DISCARD;d3dpp.hDeviceWindow=hWnd;d3dpp.BackBufferFormat   =D3DFMT_X8R8G8B8;d3dpp.BackBufferWidth   =SCREEN_WIDTH;d3dpp.BackBufferHeight   =SCREEN_HEIGHT;d3dpp.EnableAutoDepthStencil    =  TRUE;d3dpp.AutoDepthStencilFormat    =  D3DFMT_D16;// Create the devicemd3dObject->CreateDevice(D3DADAPTER_DEFAULT,// AdapterD3DDEVTYPE_HAL,// Device TypehWnd,// Focus WindowD3DCREATE_SOFTWARE_VERTEXPROCESSING,// Behavior Flags&d3dpp,// Presentation Params&gd3dDevice);// D3D Devicegd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);}////////// This is from DirectX.h/////public:CDirectX(void);~CDirectX(void);Device *device; // This is where the Device is passed from the class void Init(HWND hWnd, HINSTANCE hInst,int nWidth, int nHeight, bool bWindowed);void Update();void Render();void Run_Particles();void Shutdown();};////////// This is from DirectX.cpp/////void CDirectX::Init(HWND hWnd, HINSTANCE hInst, int nWidth, int nHeight, bool bWindowed){/////////////////////////////////////////////////////////////////////////// Initialize Graphics//////////////////////////////////////////////////////////////////////// load the texture we will useD3DXCreateTextureFromFile(device->gd3dDevice,"fire.png",&texture);This is how I'm passing on the device.   ;  Can you post the code where the device is constructed and set: somehting like:Device *device = new Device();device->Init(...);CDirectX *directX = new CDirectX;directX->Init(...);directX->device = device;I would put a break point in the device constructor and see how many times it gets hit, if its more than once then that narrows down the problem alot.   