Mike McCormack : avifil32: Use HeapAlloc instead of GlobalAlloc.
Eliminate windowsx.h.
Alexandre Julliard
julliard at wine.codeweavers.com
Sat Mar 18 12:51:00 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 417067bb0d0323af5100e45cba05afedbeffc28a
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=417067bb0d0323af5100e45cba05afedbeffc28a
Author: Mike McCormack <mike at codeweavers.com>
Date: Sat Mar 18 10:17:33 2006 +0900
avifil32: Use HeapAlloc instead of GlobalAlloc. Eliminate windowsx.h.
---
dlls/avifil32/avifile.c | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c
index c6f4827..b89a454 100644
--- a/dlls/avifil32/avifile.c
+++ b/dlls/avifil32/avifile.c
@@ -40,7 +40,6 @@
#include "winuser.h"
#include "winnls.h"
#include "winerror.h"
-#include "windowsx.h"
#include "mmsystem.h"
#include "vfw.h"
@@ -1341,7 +1340,7 @@ static HRESULT WINAPI IAVIStream_fnWrite
return AVIERR_UNSUPPORTED;
}
- This->lpHandlerData = GlobalAllocPtr(GMEM_MOVEABLE, size);
+ This->lpHandlerData = HeapAlloc(GetProcessHeap(), 0, size);
if (This->lpHandlerData == NULL)
return AVIERR_MEMORY;
This->cbHandlerData = size;
@@ -1576,7 +1575,7 @@ static void AVIFILE_DestructAVIStream
This->cbBuffer = 0;
}
if (This->lpHandlerData != NULL) {
- GlobalFreePtr(This->lpHandlerData);
+ HeapFree(GetProcessHeap(), 0, This->lpHandlerData);
This->lpHandlerData = NULL;
This->cbHandlerData = 0;
}
@@ -1687,8 +1686,7 @@ static HRESULT AVIFILE_LoadFile(IAVIFile
case ckidSTREAMHANDLERDATA:
if (pStream->lpHandlerData != NULL)
return AVIERR_BADFORMAT;
- pStream->lpHandlerData = GlobalAllocPtr(GMEM_DDESHARE|GMEM_MOVEABLE,
- ck.cksize);
+ pStream->lpHandlerData = HeapAlloc(GetProcessHeap(), 0, ck.cksize);
if (pStream->lpHandlerData == NULL)
return AVIERR_MEMORY;
pStream->cbHandlerData = ck.cksize;
@@ -1702,8 +1700,7 @@ static HRESULT AVIFILE_LoadFile(IAVIFile
if (ck.cksize == 0)
break;
- pStream->lpFormat = GlobalAllocPtr(GMEM_DDESHARE|GMEM_MOVEABLE,
- ck.cksize);
+ pStream->lpFormat = HeapAlloc(GetProcessHeap(), 0, ck.cksize);
if (pStream->lpFormat == NULL)
return AVIERR_MEMORY;
pStream->cbFormat = ck.cksize;
More information about the wine-cvs
mailing list