If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Other > VisualDbase - HldBase.dll - and XP

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-24-02, 04:18
wmedor wmedor is offline
Registered User
 
Join Date: May 2002
Location: Paris France
Posts: 4
Question VisualDbase - HldBase.dll - and XP

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)) + "'"
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On