阅读:2626回复:4
有谁用过ExtEscape(...)
各位高手,可否有谁用过ExtEscape(...),请帮小女子一把。
email:susankeen@163.net |
|
沙发#
发布于:2002-02-05 16:25
对于视频及显卡没有涉及过,不知你是在作应用层还是内核层程序?
只找到一些相关的信息,你看一下,希望对你有所帮助: 4. Properties 4.1 Initialization After loading the xfddx driver loads the original NT display driver (described in the xfddx_aux.cfg text file). All NT graphics output is handled by the original driver. 4.2 Mapping capabilities The xfddx driver provides a function to map the graphics adaptor video frame buffer dynamically into the address space of any user mode process via an Escape (Win 32: ExtEscape) call as described in the xfddx_escape header file. The mapping is device independent (works even with banked frame buffers). This feature can be used to implement (the output of) a framebuffer X Server based on the xvfb code. 4.3 X Server GCops graphics calls The xfddx driver provides a way to handle the X standard GCops calls via calls to the installed original NT display driver ( inherently using all accelerator capabilities of the installed graphics adapter available to the installed NT display driver in a device independent way ). In this first version the GC functions are implemented as stubs only. The GC calls are accessible to user mode processes through the Win32 DrawEscape. 4.4 Extension driver support To promote extensibility, flexibility and to accelerate develpment cycles, the xfddx driver can dynamically load/unload extension drivers. Extension drivers are standard NT display drivers build with the NT DDK like the xfddx module itself. An extension driver must provide the DrvEnableDriver function and may additionally support other entry points. Modified GCops routines and extensions (as GLX calls for example) can be added dynamically by supporting the DrvDrawEscape request in an dynamically loaded extension driver. Multiple extension drivers can be are supported. All extension drivers which support the DrvEscape and DrvDrawEscape requests are called in their load order until one of them returns success and before the the corresponding xfddx routine is executed. The extension drivers DrvEnableDriver routines are called with the pded->pdrvfn argument pointing to a structure representing the original NT display driver. If they need access to the functions of the NT display driver, they should save away this pointer before initializing the pded->pdrvfn field with the address of their DRVFN array. |
|
板凳#
发布于:2002-02-06 11:07
blue,
谢谢你的指点。 我是用于打印机这一块,确切地说,我现在写了一个应用程序,其中有一项是对打印机的print quality进行设置,预设值有三种,即Draft,Normal,Best . 我必须要完成的是:这三项值必须传给对应的打印机属性,让打印机的driver去接收。 比如,用户选择Draft,则打印对话框出现时里面的打印质量必须是Draft. 本来可以通过标准的DEVMODE来设定,但因为我公司对应的打印机是Lexmark ,Lexmark自己设定了DEVMODE,所以我必须通过ExtEscape 发送命令来让printer driverr接收。 而我调用ExtEscape后通过调试发现根本没执行,返回错误122 ,不知如何去做? 不知你能否再帮我一把? 公司老板要求年前搞定。 10日放假,还有几天时间。 |
|
地板#
发布于:2002-02-06 15:17
啊!只是应用层,那就好办了(比较好糊弄嘛)。
好象是你的参数有点问题,我怀疑是cbOutput太小了,你把它改得足够大试一下。你能把代码贴出来看下吗? |
|
地下室#
发布于:2002-02-06 17:20
好啊,不过现在在win98下可以收到值了;但在win2k下没反应。
#define ED_PRTQUALITY 4 #define SET_EXTDEVMODE 13024 struct { short index; //one of EXTDEV_ char value[32];//return value (or set) } esc_info; int value = QualityCB->ItemIndex;(三种质量值的索引号) esc_info.index = ED_PRTQUALITY; esc_info.value[1] = LOBYTE(value);//to put value into buffer esc_info.value[0] = HIBYTE(value); HDC hDc;(假定已得到打印机的句柄) int dmsize ;(DEVMODE的大小) PINTER_INFO2 pPrinterInfo2 ; ExtEscape(hDC,SET_EXTDEVMODE,sizeof(esc_info),(LPCSTR)& esc_info, dmsize,(LPSTR)pPrinterInfo2->pDevMode); 最后用 DocumentProperties(...) 显示打印机对话框。 刚才试了一下,在98下是可以改变的,但在2000下没任何反应。 麻烦你帮我看一下。 |
|