home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
basic
/
library
/
vb
/
hugearr
/
hugearr.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-04-11
|
1KB
|
47 lines
/* 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 <windows.h>
#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;
}