Path: utzoo!attcan!uunet!cs.utexas.edu!execu!sequoia!cb From: cb@sequoia.UUCP (Christopher D. Brown) Newsgroups: comp.sys.ibm.pc Subject: Re: MSC, Devices, and 0x1a Message-ID: <10234@sequoia.UUCP> Date: 6 Mar 90 13:32:49 GMT References: <10521@ttidca.TTI.COM> Reply-To: cb@sequoia.UUCP () Organization: Execucom Systems Corp., Austin, Texas Lines: 45 In article <10521@ttidca.TTI.COM> woodside@ttidca.tti.com (George Woodside) writes: >When a binary file is opened under MSC (5.1), and the file name is a [edited} >In reality, when a binary data stream (a graphic image) to a printer >contains an 0x1a character, the output is truncated, and eventually the >subsequent write calls will return a file write error. > [edited} After opening the file you need to use the DOS IOCTL Get Device Information function to check for a character device and the DOS IOCTL Set Device Information to set the character device to raw mode. SetRawMode( int Handle ) { union REGS Regs; Regs.x.ax = 0x4400; Regs.x.bx = Handle; intdos( &Regs, &Regs ); if ( !Regs.cflag ) { if ( Regs.x.dx & 0x0080 ) { Regs.x.ax = 0x4401; Regs.x.bx = Handle; Regs.x.dx &= 0x00AF; intdos( &Regs, &Regs ); } } } ----- Christopher D. Brown Digital: {uunet|texbell|cs.utexas.edu}!execu!cb Analog: (512) 327-7070 Physical: Execucom, 108 Wild Basin Road, Two Wild Basin, Austin, TX 78764 -- Christopher D. Brown Digital: {uunet|texbell|cs.utexas.edu}!execu!cb Analog: (512) 327-7070 Physical: Execucom, 108 Wild Basin Road, Two Wild Basin, Austin, TX 78764