Ladislav Sladecek lsla@post.cz writes:
- The real reason for the crash is that the application calls Escape16 with
hdc equal to 0 and function equal to GETPRINTINGOFFSET. I do not understand why, they did not even start to print. Maybe, this is an undocumented windows function? After I temporarily disabled Escape16, the application began to work.
It's not supposed to crash even if the hdc is invalid. Do you have a backtrace of the crash?
- To fix Escape16, the 16bit printer driver is necessary. I need printing
either. I will try to work on it if you just give me a piece of advice. I think that two ways are possible:
A) To use the static table and to modify create_driver to work with it.
B] To create a 16bit printer driver DLL similarly to the 32bit drivers.
The static table is OK, but you'll need to add a number of functions that were done by escapes before (AbortDoc, StartDoc, etc.) And of course there is still the GDI lock issue so I don't know if you can actually print something even if you fix the initialisation.
On St, 08 srp 2001, Alexandre Julliard wrote:
Ladislav Sladecek lsla@post.cz writes:
- The real reason for the crash is that the application calls Escape16 with
hdc equal to 0 and function equal to GETPRINTINGOFFSET. I do not understand
It's not supposed to crash even if the hdc is invalid. Do you have a backtrace of the crash?
I ovelooked that the EscapeXXXX functions changed too. If you look at the source of Escape16 you will find this:
case GETPHYSPAGESIZE: case GETPRINTINGOFFSET: case GETSCALINGFACTOR: { POINT16 *ptr = MapSL(in_data); POINT pt32;
ret = Escape( hdc, escape, 0, NULL, &pt32 ); ptr->x = pt32.x; ptr->y = pt32.y; return ret; }
The function is called like this:
0806c1c8:Call GDI.38: ESCAPE(0x0000,0x000d,0x0000,0x00000000,0657:e8f4) ret=0ff7:4428 ds=1207
The in_data pointer is null but the code assigns to it, thats why it crashes. I think that the result should be assigned to the output parameter.
Ladislav Sladecek