English 中文(简体)
D3D 闭门检查期间未检测到的
原标题:D3D Device Failure During Screen Locked

我有一个问题是由于直接3D9失败造成的:CreateDevice(......)。 当以下代码由视窗7下的锁定屏幕执行时,该代码即告失败。 由于需要,我需要在屏幕锁定时能够制造一个装置。

我在创建Device时发现D3DERR_INVALIDCALL错误,其参数如下。 我广泛试验了正在使用的HWND,并对它有效进行了双重检查。 我也尝试了各种显示参数,但没有结果。 此前曾遇到过这种情况,或者对可能给谁造成不实的召回?

同样,这种失败只是在锁定的屏幕上发生,在任何其他经过测试的国家里,它才会成功。

D3DPRESENT_PARAMETERS pp;
ZeroMemory( &pp, sizeof(D3DPRESENT_PARAMETERS) );
pp.BackBufferFormat = D3DFMT_UNKNOWN;
pp.SwapEffect       = D3DSWAPEFFECT_DISCARD;
pp.Windowed         = TRUE;

HWND focusWndHnd = GetConsoleWindow();

if ( focusWndHnd == NULL && pp.hDeviceWindow == NULL )
{
   focusWndHnd = ::GetDesktopWindow();
}


IDirect3DDevice9* pd3dDevice;

IDirect3D9* pD3D = Direct3DCreate9( D3D_SDK_VERSION );

hr = pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_NULLREF, focusWndHnd,
             D3DCREATE_SOFTWARE_VERTEXPROCESSING|D3DCREATE_FPU_PRESERVE, &pp, &pd3dDevice );
问题回答

遗产直接3D 9接口认为,安全桌面是一种丢失的装置情景。 利用社发所了解的直接3D(Direct3D9Ex, Direct3D 10.x,或 Direct3D 11.x)版本将避免这一问题。

由于只有允许这种价值的窗户,像OJ所宣称的here?

由于查克·瓦尔布恩的回答,我已经解决了我的相关问题,即D3D装置的初始化工作一旦升级即告安全。 在我的案件中,我在安全会议期间收到了<代码>D3DERR_NOTAVAILABLE的错误。 替换了<代码>IDirect3D9*>,>IDirect3D9Ex*Direct3DCreate9 with Direct3DCreate9/Excode> 然后,初步化成功结束!

此外,我还必须强调,Kats的答复并不直接而是仅提及相关<>问题”,因为,正如我所理解的那样,Kent的情景指的是 。 可通过CTRL+L进入的会议。 在Kate s一案中,I haven t在一次闭门会议上遇到D3D初始化问题。





相关问题
Why running a service as Local System is bad on windows?

I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...

Programmatically detect Windows cluster configuration?

Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...

get file icon for Outlook appointment (.msg)

I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" ...

Identifying idle state on a windows machine

I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn t mean the ...

Terminating a thread gracefully not using TerminateThread()

My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...