[comp.windows.ms.programmer] Problem with PASSTHROUGH command in Escape function

David GELDREICH <GELDREIC@FRECP12.BITNET> (05/31/91)

   Hi crazy people who are still programming under windows...
    I am wondering what I am doing wrong because I got a general protection fau
lt when I try to do a Escape(hPr, PASSTHROUGH, lstrlen(lpTxt), lpTxt, NULL).

   Before calling this fonction, I call CreateDC and Escape(hPr, SETABORTPROC .
.. and STARTDOC and finally Escape(hPr, PASSTHROUGH,... and I got a GP fault in
side of this function.

   Between, the STARTDOC and ENDDOC I just do this escape call. If I do not put
 the passthrough, all goes well.

    If you have time to help me, I would be very happy.

               Thanks in advance.

                  David Geldreich (Ecole Centrale Paris)

OS/2: Half an operating system, but what is windows ???

kensy@microsoft.UUCP (Ken SYKES) (06/03/91)

In article <91151.001714GELDREIC@FRECP12.BITNET> GELDREIC@FRECP12.BITNET (David GELDREICH) writes:
>
>   Hi crazy people who are still programming under windows...
>    I am wondering what I am doing wrong because I got a general protection fau

Based on the above call I would infer you didn't put the byte count in the
first word of lpTxt.  If you look at page 12-40 you will see this is
required. 

>OS/2: Half an operating system, but what is windows ???

Well, if you have OS/2 and Windows 3.0 I guess that would make
Windows = 6 * OS /2 !  ;)

Ken Sykes
Disclaimer: The above opinions are solely my own.