home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Boston 2
/
boston-2.iso
/
DOS
/
PROGRAM
/
BASIC
/
HUGEARR
/
HUGEINFO.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-12-01
|
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;
}