Xref: utzoo comp.unix.msdos:409 comp.unix.sysv386:6569 comp.unix.xenix.sco:2095 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!math.fu-berlin.de!opal!unido!pemcom!basien From: basien@pemcom.pem-stuttgart.de (Tillmann A. Basien) Newsgroups: comp.unix.msdos,comp.unix.sysv386,comp.unix.xenix.sco Subject: File Size Error under VPIX and PCNFS Keywords: vpix Message-ID: <1145@pemcom.pem-stuttgart.de> Date: 2 Apr 91 20:23:44 GMT Followup-To: comp.unix.msdos Organization: PEM GmbH, Stuttgart Lines: 67 During my work as an autherized SCO reseller I get many problems. On of my last was, that open access can^t create indexfiles with the correct size. Some month a go I posted a question to this subject and I got no answer. So I analysed the problem with some hand made tools to get the int21 call list of a dos-application (one day work). With that tools I found a explanation of the problem. Is there anybody who can confirm my results ? Here is the test programm for MSC 5.1: =============================================================================== #include #include #include #include #include #include /***************************************************************************** TEST PROGRAMM TO DEMONSTRATE A VPIX ANDA PC_NFS ERROR During my work with VP/ix I got on MS WORD and Open Access two identical problems. WORD can't open a spezified file and Open Access creates an indexfile with the size of 0 insteed of 512. So I wrote a programm to analyse the INT21 calls of the applications. And I found the following explanation. On virtuell drives the DOS-seek(0x42) and DOS-write(0x40) systemcalls does not work correctly. This programms creates a file calles TEST.XX. In this file, which actually has the size 0, the programm will go to position 512. Then 0 bytes will be written and the file will be closed. On a pure DOS-Drive (C: or D:) the new file has the size of 512 bytes. On a network viruell drive or a VP/ix drive the size will be 0. TB PEM GmbH, 2.April 1991 */ main() { int fp; int rtn; long pos; union REGS in,out; /* creat file */ _dos_creat("test.xx",_A_NORMAL,&fp); printf("open: %d\n",fp); /* Seek to position 512 behind the actuell EOF position */ in.h.ah=0x42; in.h.al=0x00; in.x.bx=fp; in.x.cx=0; in.x.dx=512; intdos(&in,&out); printf("lseek: %04x:%04x\n",out.x.dx,out.x.ax); /* Write 0 Bytes, to fill the 512 bytes infront of EOF */ rtn=_dos_write(fp,&fp,0,0); printf("write: %d\n",rtn); /* close the file */ _dos_close(fp); } -- basien@PEM-Stuttgart.de Dipl.-Ing. Tillmann A. Basien PEM Programmentwicklungsgesellschaft Vaihinger Str.49, PostBox 810165 fuer Microcomputer mbH FRG 7000 Stuttgart 80 voice: +49-711-713045 fax: +49-711-713047