Category : BASIC Source Code
Archive   : HUGARY.ZIP
Filename : HUGEARR.C

 
Output of file : HUGEARR.C contained in archive : HUGARY.ZIP


/* HUGEARR.DLL
Huge array support for Microsoft Visual Basic

Original program by Mike Warning.
Modifications by Jonathan Zuck, Stephen Schmidt, and
End User Computing, Ltd.

This module contains only the DLL entry and exit functions.
*/

/* VBG: '########## HUGEARR -- Huge Array Functions -- Global */
/* VBM: '########## HUGEARR -- Huge Array Functions -- Module */

#define NOCOMM
#include

#include "hugearr.h"

HANDLE hLocalMem; /* handle to local memory */
int NumArrays; /* total number of arrays */

int FAR PASCAL
LibMain(HANDLE hInstance, WORD wDataSeg, WORD cbHeapSize, LPSTR lpszCmdLine)
{
if (cbHeapSize > 0)
UnlockData(0);

/* Allocate memory for array descrips. */
hLocalMem = LocalAlloc(LMEM_MOVEABLE | LMEM_ZEROINIT, LocalCompact((WORD) 32768));
if (hLocalMem == NULL)
/* Something happened, bomb out */
return 0;

/* calc total number of arrays */
NumArrays = (int) (LocalSize(hLocalMem) / sizeof(HUGEDESC));

return 1;
}

int FAR PASCAL
WEP(int nParameter)
{
LocalFree(hLocalMem);
return 1;
}