高分求,如何得到显示驱动的句柄

wflishh 2009-02-24 11:14:54
BOOL
DrvIcmSetDeviceGammaRamp(
IN DHPDEV dhpdev,
IN ULONG iFormat,
IN LPVOID lpRamp
);


Parameters
dhpdev
Handle to the physical device's PDEV. This identifies the physical device whose gamma ramp is to be set.
iFormat

请问一下,每一个参数,我应该用什么函数来得到,查了好几天资料现在还无果。谢谢。
...全文
98 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
wmpkumse 2009-02-24
  • 打赏
  • 举报
回复
不会,友情帮顶
会思考的草 2009-02-24
  • 打赏
  • 举报
回复
dhpdev是在调用DrvEnablePDEV时返回的,这个句柄实际上就是一个指向PDEV结构的指针。

你为什么要得到这个句柄呢?如果你是写显示驱动,这个句柄将是很多DDI函数的入口参数之一,这是由caller提供的。
会思考的草 2009-02-24
  • 打赏
  • 举报
回复
一般来说,DDI函数族,都是由驱动实现,被上层(GDI,或者上层的驱动)所调用的。
wflishh 2009-02-24
  • 打赏
  • 举报
回复
是呀。可怎么得到一个dhpdev
不要告诉我用CreatFile()
会思考的草 2009-02-24
  • 打赏
  • 举报
回复
看名字,这应该是DDI接口中的一个吧,定义显示设备伽玛校正的曲线表。各个参数定义很简单,看msdn:

dhpdev
Handle to the physical device's PDEV. This identifies the physical device whose gamma ramp is to be set.
iFormat
Specifies the data format of the buffer to which lpRamp points. This parameter is always IGRF_RGB_256WORDS.
lpRamp
Pointer to the buffer containing the gamma ramp to be set on the device. The format of the data in this buffer is determined by iFormat.
When iFormat is IGRF_RGB_256WORDS, lpRamp points to a GAMMARAMP structure that defines the 256-entry ramps to be set for each of the red, blue, and green color channels. Each value is described using 16-bit precision. If the hardware has fewer bits of precision, it should downshift and use the most significant bits, without rounding.

PDEV是一个用于描述物理设备(一般用于显示设备)的结构:
Each kernel-mode graphics driver represents a single logical device managed by GDI. In turn, a driver can manage one or more PDEV structures. A PDEV is a logical representation of the physical device. It is characterized by the type of hardware, logical address, and surfaces that can be supported
会思考的草 2009-02-24
  • 打赏
  • 举报
回复
第三个参数是标记为IN的,也就是说是入口参数,由caller提供。要么你自己搞一个Gamma Ramp table传进去,要么就想办法hook住这个函数。
wflishh 2009-02-24
  • 打赏
  • 举报
回复
我是想通过这个函数来修改显示器的。lut(look up table) 即函数的第三个参数。用于校证显示器的色温。
有没有办法得到?

2,641

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 硬件/系统
社区管理员
  • 硬件/系统社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧