directly use HeapAlloc/Free in midl_user_allocate and midl_user_free
instead of the depreciated GlobalAlloc/Free functions
Modified: trunk/reactos/lib/advapi32/service/scm.c
Modified: trunk/reactos/lib/setupapi/rpc.c
Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c
_____
Modified: trunk/reactos/lib/advapi32/service/scm.c
--- trunk/reactos/lib/advapi32/service/scm.c 2005-05-05 12:58:03 UTC
(rev 14998)
+++ trunk/reactos/lib/advapi32/service/scm.c 2005-05-05 13:24:39 UTC
(rev 14999)
@@ -948,12 +948,12 @@
void __RPC_FAR * __RPC_USER midl_user_allocate(size_t len)
{
- return GlobalAlloc(GPTR,len);
+ return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
}
void __RPC_USER midl_user_free(void __RPC_FAR * ptr)
{
- GlobalFree(ptr);
+ HeapFree(GetProcessHeap(), 0, ptr);
}
/* EOF */
_____
Modified: trunk/reactos/lib/setupapi/rpc.c
--- trunk/reactos/lib/setupapi/rpc.c 2005-05-05 12:58:03 UTC (rev
14998)
+++ trunk/reactos/lib/setupapi/rpc.c 2005-05-05 13:24:39 UTC (rev
14999)
@@ -69,14 +69,14 @@
void __RPC_FAR * __RPC_USER
midl_user_allocate(size_t len)
{
- return GlobalAlloc(GPTR, len);
+ return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
}
void __RPC_USER
midl_user_free(void __RPC_FAR * ptr)
{
- GlobalFree(ptr);
+ HeapFree(GetProcessHeap(), 0, ptr);
}
/* EOF */
_____
Modified: trunk/reactos/services/umpnpmgr/umpnpmgr.c
--- trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-05-05 12:58:03 UTC
(rev 14998)
+++ trunk/reactos/services/umpnpmgr/umpnpmgr.c 2005-05-05 13:24:39 UTC
(rev 14999)
@@ -103,13 +103,13 @@
void __RPC_FAR * __RPC_USER midl_user_allocate(size_t len)
{
- return GlobalAlloc(GPTR, len);
+ return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
}
void __RPC_USER midl_user_free(void __RPC_FAR * ptr)
{
- GlobalFree(ptr);
+ HeapFree(GetProcessHeap(), 0, ptr);
}
Show replies by date