home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Shareware - Software Farm 2
/
wosw_2.zip
/
wosw_2
/
QBAS
/
HUGEARR.ZIP
/
HUGEINFO.C
< prev
next >
Wrap
C/C++ Source or Header
|
1992-04-02
|
1KB
|
45 lines
#define NOCOMM
#include <windows.h>
#include "hugearr.h"
/* Return the number of huge arrays that have been dimensioned but not erased. */
/* VBM: Declare Function VBHugeNumArrays% Lib "hugearr.dll" Alias "VBHugeNumArrays" () */
int FAR PASCAL
VBHugeNumArrays(VOID)
{
PHUGEDESC pArray; /* pointer to current descriptor */
int num, i; /* number free so far */
pArray = (PHUGEDESC) LocalLock(hLocalMem);
for (i = 0, num = 0; i < NumArrays; i++, pArray++)
if (pArray -> handle == NULL)
++num;
LocalUnlock(hLocalMem);
return num;
}
/* Return the upper bound of a huge array. */
/* The lower bound is always zero, and the number of elements is ubound + 1. */
/* VBM: Declare Function VBHugeUbound& Lib "hugearr.dll" Alias "VBHugeUBound" (ByVal hArray%) */
long FAR PASCAL
VBHugeUbound(int hArray)
{
PHUGEDESC pArray; /* pointer to array descriptor */
long ubound; /* upper bound of array */
DecCheckHandle(hArray);
pArray = (PHUGEDESC) LocalLock(hLocalMem) + hArray;
CheckNotAllocYet(pArray);
ubound = pArray -> ubound;
LocalUnlock(hLocalMem);
return ubound;
}