wmedor
05-24-02, 05:18
| Hello I'm using VdB 5.7. I use some programs found in the dUFLP LIBRARY (dUFLP = dBASE Users' Function Library Project). The one beside was written by Marcello Perathoner, and everything works fine under windows 98 and Millenium. But under XP, the result is quite different : ? "volume serial nr " + itoh (hlgets32 (in.dsdx, 3)) -----> 0 ? "volume label '" + trim (substr (in.dsdx, 7, 11)) + "'" -------------> blank ? "filesystem type '" + trim (substr (in.dsdx, 18, 8)) + "'" -------------> blank Maybe the DOS subfunction is different, maybe the use of a string buffer isn't allowed ? Anybody has an idea ? Thank you for your help ! *---------------------------------------------------------------------- * * HLDBXMPL.PRG -- Examples for the use of HLDBASE.CC and HLDBASE.DLL * *---------------------------------------------------------------------- * *-- Description: * * example code * *-- Programmer: * * Marcello Perathoner (CIS: 100752,3200) * *-- History: * * 12/11/1996 -- original version * *--------------------------------------------------------------------- set procedure to hldbase.cc additive local hl ; hl = new HLDBase () && create object local out ; out = new regs () && create output regs ************************************************** ********************* ? ? "IOCTL - get volume serial nr" ? ************************************************** ********************* * This function requires that we provide a buffer where DOS can * store the requested information. in = new regs () && use a new one for every call !!! in.ax = htoi ("440D") && function 44h subfunction 0Dh in.bl = 3 && 0=cur, 1=A in.cx = htoi ("0866") && more subfunction numbers in.dsdx = hlcalloc (25) && allocate a string of 25 * chr (0) as buffer hl.intdos (in, out) * We must use in.dsdx again because it is there that DOS stored the * requested information. The output registers dont know that they are * holding a pointer to data. In fact they dont even have a property * dsdx. * hlgets32 gets a _S_igned _32_ bits out of the string starting * at the requested position and stores them into a numeric dBase * variable. We should really get an unsigned 32 bits, but the internal * dBase format for integer numeric data is signed. ? "volume serial nr " + itoh (hlgets32 (in.dsdx, 3)) ? "volume label '" + trim (substr (in.dsdx, 7, 11)) + "'" ? "filesystem type '" + trim (substr (in.dsdx, 18, 8)) + "'" |