none
error occurs when create device is called and hr = -2005530516 RRS feed

  • Question

  • after calculation hr = -2005530516 ..

    my code is 

    D3DPRESENT_PARAMETERS d3dpp;
    ZeroMemory(&d3dpp, sizeof(d3dpp));
    d3dpp.BackBufferCount = 2;
    d3dpp.BackBufferWidth = d3ddm.Width/*WND_WIDTH*/;
    d3dpp.BackBufferHeight = d3ddm.Height/*WND_HEIGHT*/;
    d3dpp.Windowed = !bFullScreen;
    d3dpp.SwapEffect = D3DSWAPEFFECT_FLIP;
    d3dpp.BackBufferFormat =d3ddm.Format; /*D3DFMT_A8R8G8B8;*/
    d3dpp.EnableAutoDepthStencil = TRUE;
    d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
    d3dpp.hDeviceWindow = hDeviceWnd;
    d3dpp.FullScreen_RefreshRateInHz = 60.0f;


    HRESULT hr=0;

        if(FAILED(hr=pD3D->CreateDevice( Adapter, D3DDEVTYPE_HAL,hFocusWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp, ppD3DDev)))
    {


    // DXGetErrorDescription(hr);

    if(FAILED(hr=pD3D->CreateDevice( Adapter, D3DDEVTYPE_HAL, hFocusWnd,D3DCREATE_SOFTWARE_VERTEXPROCESSING,&d3dpp, ppD3DDev)))
    {

    switch(hr)
    {
    case D3DERR_INVALIDCALL:
    pLogger->Write("\nD3DERR_INVALIDCALL@");
    break;
    case D3DERR_NOTAVAILABLE:
    pLogger->Write("\nD3DERR_NOTAVAILABLE@");
    break;
    case D3DERR_OUTOFVIDEOMEMORY:
    pLogger->Write("\nD3DERR_OUTOFVIDEOMEMORY@");
    break;
    }

    }

    Monday, November 21, 2016 6:22 AM

All replies

  • Kashif,

    It's not clear what you are trying to do but I don't see that it relates to customizing or programming Microsoft Project, a project management application but that is the sole focus of this forum. I suggest you re-post to a forum that is more appropriate for what you are doing. You can start here:

    https://social.technet.microsoft.com/Forums/en-US/home?category=usingforums

    John

    Monday, November 21, 2016 2:41 PM