如何用 EngQueryDeviceAttribute 获得显卡硬件加速级别?(200分)

  • 主题发起人 主题发起人 sunset99
  • 开始时间 开始时间
S

sunset99

Unregistered / Unconfirmed
GUEST, unregistred user!
搜了一圈有关 hardware acceleration 的资料,只发现这个东东,可是俺不会用,有<br>人知道怎么用吗?那个 hdev 设置成什么啊?<br><br>EngQueryDeviceAttribute(<br> &nbsp; &nbsp;IN HDEV &nbsp;hdev,<br> &nbsp; &nbsp;IN ENG_DEVICE_ATTRIBUTE &nbsp;devAttr,<br> &nbsp; &nbsp;IN VOID &nbsp;*pvIn,<br> &nbsp; &nbsp;IN ULONG &nbsp;ulInSize,<br> &nbsp; &nbsp;OUT VOID &nbsp;*pvOut,<br> &nbsp; &nbsp;OUT ULONG &nbsp;ulOutSize<br> &nbsp; &nbsp;);
 
EngQueryDeviceAttribute<br>The EngQueryDeviceAttribute function allows the driver to query the system about particular attributes of the device.<br><br>BOOL<br> &nbsp;EngQueryDeviceAttribute(<br> &nbsp; &nbsp;IN HDEV &nbsp;hdev,<br> &nbsp; &nbsp;IN ENG_DEVICE_ATTRIBUTE &nbsp;devAttr,<br> &nbsp; &nbsp;IN VOID &nbsp;*pvIn,<br> &nbsp; &nbsp;IN ULONG &nbsp;ulInSize,<br> &nbsp; &nbsp;OUT VOID &nbsp;*pvOut,<br> &nbsp; &nbsp;OUT ULONG &nbsp;ulOutSize<br> &nbsp; &nbsp;);<br>Parameters<br>hdev <br>Handle to the device. This parameter is the GDI handle received by the driver's DrvCompletePDEV function. <br>devAttr <br>Specifies the attribute for which GDI should return information. This parameter must be QDA_ACCELERATION_LEVEL, which queries the driver accelerations that GDI currently allows. <br>pvIn <br>Reserved for system use. This parameter is currently ignored by GDI. <br>ulInSize <br>Reserved for system use. This parameter is currently ignored by GDI. <br>pvOut <br>Pointer to a buffer of ulOutSize bytes in which GDI writes information about the attribute being queried. When devAttr is QDA_ACCELERATION_LEVEL, GDI writes in the buffer a DWORD value from 0 through 5 that indicates the current acceleration level. See Display Driver Testing Tools for a description of the acceleration levels. <br>ulOutSize <br>Specifies the size, in bytes, of the buffer to which pvOut points. <br>Return Value<br>EngQueryDeviceAttribute returns TRUE upon success; otherwise, it returns FALSE.<br><br>Headers<br>Declared in winddi.h. Include winddi.h.<br><br>Comments<br>The video card's acceleration level can be dynamically set through the Display program in Control Panel. EngQueryDeviceAttribute allows the driver to determine the acceleration level currently set.<br><br><br><br>When devAttr is QDA_ACCELERATION_LEVEL, GDI writes in the buffer a DWORD value from 0 through 5 that indicates the current acceleration level.<br>当devAttr 是QDA_ACCELERATION_LEVEL,GDI一个0到5的DWORD到这个BUFFER中,这个值标明当前的加速级别.
 
这个也从 MSDN 里查到过,可还是不知道该怎么写 ;(
 
后退
顶部