From d6367e4125cbd1c515dbb988b7f3fef2a540dce1 Mon Sep 17 00:00:00 2001 From: kichik Date: Fri, 9 Sep 2005 16:08:44 +0000 Subject: [PATCH] my_GlobalAlloc no longer reduces the size git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4255 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/Ui.c | 2 +- Source/exehead/exec.c | 8 ++++---- Source/exehead/fileform.c | 2 +- Source/exehead/util.c | 4 ---- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 4414b2d1..6619fd98 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -1129,7 +1129,7 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar g_SectionHack=hwndDlg; - hTreeItems=(HTREEITEM*)my_GlobalAlloc(sizeof(HTREEITEM)*num_sections); + hTreeItems=(HTREEITEM*)GlobalAlloc(GPTR,sizeof(HTREEITEM)*num_sections); hBMcheck1=LoadBitmap(g_hInstance, MAKEINTRESOURCE(IDB_BITMAP1)); diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index 06849984..c52d8190 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -696,7 +696,7 @@ static int NSISCALL ExecuteEntry(entry *entry_) } else { - s=(stack_t*)my_GlobalAlloc(sizeof(stack_t)); + s=(stack_t*)GlobalAlloc(GPTR,sizeof(stack_t)); GetNSISString(s->text,parm0); s->next=g_st; g_st=s; @@ -900,7 +900,7 @@ static int NSISCALL ExecuteEntry(entry *entry_) if (s1) { void *b1; - b1=my_GlobalAlloc(s1); + b1=GlobalAlloc(GPTR,s1); if (b1) { UINT uLen; @@ -1410,7 +1410,7 @@ static int NSISCALL ExecuteEntry(entry *entry_) { unsigned char *filebuf; int filehdrsize = g_filehdrsize; - filebuf=(unsigned char *)my_GlobalAlloc(filehdrsize); + filebuf=(unsigned char *)GlobalAlloc(GPTR,filehdrsize); if (filebuf) { DWORD lout; @@ -1418,7 +1418,7 @@ static int NSISCALL ExecuteEntry(entry *entry_) ReadSelfFile((char*)filebuf,filehdrsize); { unsigned char* seeker; - unsigned char* unicon_data = seeker = (unsigned char*)my_GlobalAlloc(parm2); + unsigned char* unicon_data = seeker = (unsigned char*)GlobalAlloc(GPTR,parm2); if (unicon_data) { GetCompressedDataFromDataBlockToMemory(parm1,unicon_data,parm2); while (*seeker) { diff --git a/Source/exehead/fileform.c b/Source/exehead/fileform.c index 3f8029fb..739a636b 100644 --- a/Source/exehead/fileform.c +++ b/Source/exehead/fileform.c @@ -237,7 +237,7 @@ const char * NSISCALL loadHeaders(int cl_flags) } #endif//NSIS_CONFIG_CRC_SUPPORT - data = (void *)my_GlobalAlloc(h.length_of_header); + data = (void *)GlobalAlloc(GPTR,h.length_of_header); #ifdef NSIS_COMPRESS_WHOLE inflateReset(&g_inflate_stream); diff --git a/Source/exehead/util.c b/Source/exehead/util.c index 44808dcf..fe527990 100644 --- a/Source/exehead/util.c +++ b/Source/exehead/util.c @@ -90,10 +90,6 @@ int NSISCALL my_MessageBox(const char *text, UINT type) { return MessageBox(g_hwnd, text, g_caption, _type); } -void * NSISCALL my_GlobalAlloc(DWORD dwBytes) { - return (void *)GlobalAlloc(GPTR, dwBytes); -} - void NSISCALL myDelete(char *buf, int flags) { static char lbuf[NSIS_MAX_STRLEN];