hi,
I am developing a JAVA application for Mac OS X. In this application i am using a native method and using a Mac OS API method PBHGetVInfo() method to get the information about the total number of blocks and block size.
int DiskTotal=0;
HParamBlockRec aRec;
aRec.volumeParam.ioVolIndex=0;
aRec.volumeParam.ioVRefNum=FoundRef;
aRec.volumeParam.ioNamePtr=NULL;
PBHGetVInfo(&aRec, FALSE);
int aNumOfBlocks=aRec.volumeParam.ioVNmAlBlks;
long aBlockSize=aRec.volumeParam.ioVAlBlkSiz;
DiskTotal=aNumOfBlocks*aBlockSize;
And i m getting successfully the NumOfBlocks and BlockSize. But the
problem is that every time i compile and run the program i get a new
value of NumOfBlocks and BlockSize. Why is this so..?
Can anybody help?
Thanx
Rachna