The "Integer" declaration instead of "Long" is correct. The weird result may
by caused by "byval" instead of "byref" on string parameters (or vice
versa). Lastly, the result number may be larger than a 32 bit integer can
contain, try using "GetDiskFreeSpaceEx" instead. See "www.vbapi.com"
regards
Bo Thomsen
GeoConsult I/S
Denmark
-----Oprindelig meddelelse-----
Fra: Andy [mailto:[EMAIL PROTECTED]]
Sendt: 13. februar 2001 09:25
Til: [EMAIL PROTECTED]
Emne: MI-L Help With Windows API
This is driving me up the walls!!!
Basically what I want to do is to use some windows api calls.
They should work fine as they are calling DLL files and Mapbasic =
provides functionality with this.
for example a simple one=20
Declare Function GetDiskFreeSpace Lib "kernel32" Alias =
"GetDiskFreeSpaceA" (ByVal lpRootPathName As String, lpSectorsPerCluster =
As Long, lpBytesPerSector As Long, lpNumberOfFreeClusters As Long, =
lpTtoalNumberOfClusters As Long) As Long
This would work fine, except that Longs are not valid variable types in =
MapInfo I have tried changing them to various other variable types and =
the only one I seem to have success with when I actually call the =
function is Integer. The only problem with integers is that it comes up =
with some weird results.
Can anyone help me?
Your help is much appreciated.
Andy
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.