Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetDiskFreeSpaceEx
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00272038
Message ID:
00272147
Views:
37
Hi John,
> Thank you. The sample from FAQ works perfectly.
> I am looking through the source code and I have some question about it:
> 1. Why we need to REPLICATE(CHR(0),nnum) for certain variable?

It's simply allocating space for the return value. Without doing to you risk the possibility of the system crashing.

> 2. What is the Integertostring and stringtointeger does actually?

They convert string and integer values appropriately. StringToInteger() returns aan integer value (regardless of the size of the integer). In this case, we're dealing with a 64 bit integer which VFP ddoesn't understand. IntegerToString, converts any integer into string. You have control over the size of it.

> 3. Where could I get information about the memory allocation of structure? I known that there are sample or class in file section but I don't understand it well. Where could I get the more details info?

In higher level languages, simply intializing the variable of what's being returned approporiately works. In a lower level language you have to allocate the memory yourself. A knowledge of C++ is always helpful.
>
>Thank you
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform