urlmon: Rename the wrappers around HeapAlloc() &Co to use the new standard naming.

Michael Stefaniuc mstefani at redhat.de
Thu Nov 29 15:12:34 CST 2007


---
 dlls/urlmon/bindctx.c     |    8 +++---
 dlls/urlmon/binding.c     |   36 ++++++++++++++++----------------
 dlls/urlmon/bindprot.c    |    4 +-
 dlls/urlmon/file.c        |   12 +++++-----
 dlls/urlmon/format.c      |    8 +++---
 dlls/urlmon/ftp.c         |    4 +-
 dlls/urlmon/http.c        |   34 +++++++++++++++---------------
 dlls/urlmon/mk.c          |   12 +++++-----
 dlls/urlmon/regsvr.c      |    4 +-
 dlls/urlmon/sec_mgr.c     |   22 +++++++++---------
 dlls/urlmon/session.c     |   12 +++++-----
 dlls/urlmon/umon.c        |   50 ++++++++++++++++++++++----------------------
 dlls/urlmon/umstream.c    |   28 ++++++++++++------------
 dlls/urlmon/urlmon_main.h |    8 +++---
 14 files changed, 121 insertions(+), 121 deletions(-)

diff --git a/dlls/urlmon/bindctx.c b/dlls/urlmon/bindctx.c
index fb4136f..e1b48c3 100644
--- a/dlls/urlmon/bindctx.c
+++ b/dlls/urlmon/bindctx.c
@@ -132,7 +132,7 @@ static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface)
         if(This->authenticate)
             IAuthenticate_Release(This->authenticate);
         IBindStatusCallback_Release(This->callback);
-        urlmon_free(This);
+        heap_free(This);
     }
 
     return ref;
@@ -455,7 +455,7 @@ static const IAuthenticateVtbl BSCAuthenticateVtbl = {
 
 static IBindStatusCallback *create_bsc(IBindStatusCallback *bsc)
 {
-    BindStatusCallback *ret = urlmon_alloc_zero(sizeof(BindStatusCallback));
+    BindStatusCallback *ret = heap_alloc_zero(sizeof(BindStatusCallback));
 
     ret->lpBindStatusCallbackVtbl = &BindStatusCallbackVtbl;
     ret->lpServiceProviderVtbl    = &BSCServiceProviderVtbl;
@@ -640,7 +640,7 @@ static ULONG WINAPI AsyncBindCtx_Release(IBindCtx *iface)
 
     if(!ref) {
         IBindCtx_Release(This->bindctx);
-        urlmon_free(This);
+        heap_free(This);
     }
 
     return ref;
@@ -837,7 +837,7 @@ HRESULT WINAPI CreateAsyncBindCtxEx(IBindCtx *ibind, DWORD options,
     if(FAILED(hres))
         return hres;
 
-    ret = urlmon_alloc(sizeof(AsyncBindCtx));
+    ret = heap_alloc(sizeof(AsyncBindCtx));
 
     ret->lpBindCtxVtbl = &AsyncBindCtxVtbl;
     ret->ref = 1;
diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c
index 121e01a..8f1ed4f 100644
--- a/dlls/urlmon/binding.c
+++ b/dlls/urlmon/binding.c
@@ -299,7 +299,7 @@ static ULONG WINAPI ProtocolStream_Release(IStream *iface)
 
     if(!ref) {
         IInternetProtocol_Release(This->protocol);
-        urlmon_free(This);
+        heap_free(This);
 
         URLMON_UnlockModule();
     }
@@ -451,7 +451,7 @@ static const IStreamVtbl ProtocolStreamVtbl = {
 
 static ProtocolStream *create_stream(IInternetProtocol *protocol)
 {
-    ProtocolStream *ret = urlmon_alloc(sizeof(ProtocolStream));
+    ProtocolStream *ret = heap_alloc(sizeof(ProtocolStream));
 
     ret->lpStreamVtbl = &ProtocolStreamVtbl;
     ret->ref = 1;
@@ -531,10 +531,10 @@ static ULONG WINAPI Binding_Release(IBinding *iface)
         ReleaseBindInfo(&This->bindinfo);
         This->section.DebugInfo->Spare[0] = 0;
         DeleteCriticalSection(&This->section);
-        urlmon_free(This->mime);
-        urlmon_free(This->url);
+        heap_free(This->mime);
+        heap_free(This->url);
 
-        urlmon_free(This);
+        heap_free(This);
 
         URLMON_UnlockModule();
     }
@@ -631,7 +631,7 @@ static void switch_proc(Binding *binding, task_header_t *t)
 
     IInternetProtocol_Continue(binding->protocol, &task->data);
 
-    urlmon_free(task);
+    heap_free(task);
 }
 
 static HRESULT WINAPI InternetProtocolSink_Switch(IInternetProtocolSink *iface,
@@ -642,7 +642,7 @@ static HRESULT WINAPI InternetProtocolSink_Switch(IInternetProtocolSink *iface,
 
     TRACE("(%p)->(%p)\n", This, pProtocolData);
 
-    task = urlmon_alloc(sizeof(switch_task_t));
+    task = heap_alloc(sizeof(switch_task_t));
     memcpy(&task->data, pProtocolData, sizeof(PROTOCOLDATA));
 
     push_task(This, &task->header, switch_proc);
@@ -670,8 +670,8 @@ static void on_progress_proc(Binding *binding, task_header_t *t)
     IBindStatusCallback_OnProgress(binding->callback, task->progress,
             task->progress_max, task->status_code, task->status_text);
 
-    urlmon_free(task->status_text);
-    urlmon_free(task);
+    heap_free(task->status_text);
+    heap_free(task);
 }
 
 static void on_progress(Binding *This, ULONG progress, ULONG progress_max,
@@ -685,7 +685,7 @@ static void on_progress(Binding *This, ULONG progress, ULONG progress_max,
         return;
     }
 
-    task = urlmon_alloc(sizeof(on_progress_task_t));
+    task = heap_alloc(sizeof(on_progress_task_t));
 
     task->progress = progress;
     task->progress_max = progress_max;
@@ -694,7 +694,7 @@ static void on_progress(Binding *This, ULONG progress, ULONG progress_max,
     if(status_text) {
         DWORD size = (strlenW(status_text)+1)*sizeof(WCHAR);
 
-        task->status_text = urlmon_alloc(size);
+        task->status_text = heap_alloc(size);
         memcpy(task->status_text, status_text, size);
     }else {
         task->status_text = NULL;
@@ -727,7 +727,7 @@ static HRESULT WINAPI InternetProtocolSink_ReportProgress(IInternetProtocolSink
         break;
     case BINDSTATUS_MIMETYPEAVAILABLE: {
         int len = strlenW(szStatusText)+1;
-        This->mime = urlmon_alloc(len*sizeof(WCHAR));
+        This->mime = heap_alloc(len*sizeof(WCHAR));
         memcpy(This->mime, szStatusText, len*sizeof(WCHAR));
         break;
     }
@@ -822,7 +822,7 @@ static void report_data_proc(Binding *binding, task_header_t *t)
 
     report_data(binding, task->bscf, task->progress, task->progress_max);
 
-    urlmon_free(task);
+    heap_free(task);
 }
 
 static HRESULT WINAPI InternetProtocolSink_ReportData(IInternetProtocolSink *iface,
@@ -836,7 +836,7 @@ static HRESULT WINAPI InternetProtocolSink_ReportData(IInternetProtocolSink *ifa
         FIXME("called from worked hread\n");
 
     if(This->continue_call) {
-        report_data_task_t *task = urlmon_alloc(sizeof(report_data_task_t));
+        report_data_task_t *task = heap_alloc(sizeof(report_data_task_t));
         task->bscf = grfBSCF;
         task->progress = ulProgress;
         task->progress_max = ulProgressMax;
@@ -858,7 +858,7 @@ static void report_result_proc(Binding *binding, task_header_t *t)
         binding->request_locked = FALSE;
     }
 
-    urlmon_free(t);
+    heap_free(t);
 }
 
 static HRESULT WINAPI InternetProtocolSink_ReportResult(IInternetProtocolSink *iface,
@@ -871,7 +871,7 @@ static HRESULT WINAPI InternetProtocolSink_ReportResult(IInternetProtocolSink *i
     if(GetCurrentThreadId() == This->apartment_thread && !This->continue_call) {
         IInternetProtocol_Terminate(This->protocol, 0);
     }else {
-        task_header_t *task = urlmon_alloc(sizeof(task_header_t));
+        task_header_t *task = heap_alloc(sizeof(task_header_t));
         push_task(This, task, report_result_proc);
     }
 
@@ -1123,7 +1123,7 @@ static HRESULT Binding_Create(LPCWSTR url, IBindCtx *pbc, REFIID riid, Binding *
 
     URLMON_LockModule();
 
-    ret = urlmon_alloc(sizeof(Binding));
+    ret = heap_alloc(sizeof(Binding));
 
     ret->lpBindingVtbl              = &BindingVtbl;
     ret->lpInternetProtocolSinkVtbl = &InternetProtocolSinkVtbl;
@@ -1185,7 +1185,7 @@ static HRESULT Binding_Create(LPCWSTR url, IBindCtx *pbc, REFIID riid, Binding *
         ret->bindf |= BINDF_NEEDFILE;
 
     len = strlenW(url)+1;
-    ret->url = urlmon_alloc(len*sizeof(WCHAR));
+    ret->url = heap_alloc(len*sizeof(WCHAR));
     memcpy(ret->url, url, len*sizeof(WCHAR));
 
     ret->stream = create_stream(ret->protocol);
diff --git a/dlls/urlmon/bindprot.c b/dlls/urlmon/bindprot.c
index 5c52719..5ee8df8 100644
--- a/dlls/urlmon/bindprot.c
+++ b/dlls/urlmon/bindprot.c
@@ -114,7 +114,7 @@ static ULONG WINAPI BindProtocol_Release(IInternetProtocol *iface)
         if(This->protocol_sink)
             IInternetProtocolSink_Release(This->protocol_sink);
 
-        urlmon_free(This);
+        heap_free(This);
 
         URLMON_UnlockModule();
     }
@@ -480,7 +480,7 @@ static const IInternetProtocolSinkVtbl InternetProtocolSinkVtbl = {
 
 HRESULT create_binding_protocol(LPCWSTR url, IInternetProtocol **protocol)
 {
-    BindProtocol *ret = urlmon_alloc(sizeof(BindProtocol));
+    BindProtocol *ret = heap_alloc(sizeof(BindProtocol));
 
     ret->lpInternetProtocolVtbl = &BindProtocolVtbl;
     ret->lpInternetBindInfoVtbl = &InternetBindInfoVtbl;
diff --git a/dlls/urlmon/file.c b/dlls/urlmon/file.c
index 8e4fb1c..0a02084 100644
--- a/dlls/urlmon/file.c
+++ b/dlls/urlmon/file.c
@@ -92,7 +92,7 @@ static ULONG WINAPI FileProtocol_Release(IInternetProtocol *iface)
     if(!ref) {
         if(This->file)
             CloseHandle(This->file);
-        urlmon_free(This);
+        heap_free(This);
 
         URLMON_UnlockModule();
     }
@@ -135,10 +135,10 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
         return MK_E_SYNTAX;
 
     len = lstrlenW(szUrl)+16;
-    url = urlmon_alloc(len*sizeof(WCHAR));
+    url = heap_alloc(len*sizeof(WCHAR));
     hres = CoInternetParseUrl(szUrl, PARSE_ENCODE, 0, url, len, &len, 0);
     if(FAILED(hres)) {
-        urlmon_free(url);
+        heap_free(url);
         return hres;
     }
 
@@ -163,7 +163,7 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
             This->file = NULL;
             IInternetProtocolSink_ReportResult(pOIProtSink, INET_E_RESOURCE_NOT_FOUND,
                     GetLastError(), NULL);
-            urlmon_free(url);
+            heap_free(url);
             return INET_E_RESOURCE_NOT_FOUND;
         }
 
@@ -180,7 +180,7 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
         }
     }
 
-    urlmon_free(url);
+    heap_free(url);
 
     if(GetFileSizeEx(This->file, &size))
         IInternetProtocolSink_ReportData(pOIProtSink,
@@ -353,7 +353,7 @@ HRESULT FileProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
 
     URLMON_LockModule();
 
-    ret = urlmon_alloc(sizeof(FileProtocol));
+    ret = heap_alloc(sizeof(FileProtocol));
 
     ret->lpInternetProtocolVtbl = &FileProtocolVtbl;
     ret->lpInternetPriorityVtbl = &FilePriorityVtbl;
diff --git a/dlls/urlmon/format.c b/dlls/urlmon/format.c
index d9fce93..ca90912 100644
--- a/dlls/urlmon/format.c
+++ b/dlls/urlmon/format.c
@@ -78,8 +78,8 @@ static ULONG WINAPI EnumFORMATETC_Release(IEnumFORMATETC *iface)
     TRACE("(%p) ref=%d\n", This, ref);
 
     if(!ref) {
-        urlmon_free(This->fetc);
-        urlmon_free(This);
+        heap_free(This->fetc);
+        heap_free(This);
 
         URLMON_UnlockModule();
     }
@@ -160,7 +160,7 @@ static const IEnumFORMATETCVtbl EnumFORMATETCVtbl = {
 
 static IEnumFORMATETC *EnumFORMATETC_Create(UINT cfmtetc, const FORMATETC *rgfmtetc, UINT it)
 {
-    EnumFORMATETC *ret = urlmon_alloc(sizeof(EnumFORMATETC));
+    EnumFORMATETC *ret = heap_alloc(sizeof(EnumFORMATETC));
 
     URLMON_LockModule();
 
@@ -169,7 +169,7 @@ static IEnumFORMATETC *EnumFORMATETC_Create(UINT cfmtetc, const FORMATETC *rgfmt
     ret->it = it;
     ret->fetc_cnt = cfmtetc;
 
-    ret->fetc = urlmon_alloc(cfmtetc*sizeof(FORMATETC));
+    ret->fetc = heap_alloc(cfmtetc*sizeof(FORMATETC));
     memcpy(ret->fetc, rgfmtetc, cfmtetc*sizeof(FORMATETC));
 
     return (IEnumFORMATETC*)ret;
diff --git a/dlls/urlmon/ftp.c b/dlls/urlmon/ftp.c
index e71789c..b921293 100644
--- a/dlls/urlmon/ftp.c
+++ b/dlls/urlmon/ftp.c
@@ -81,7 +81,7 @@ static ULONG WINAPI FtpProtocol_Release(IInternetProtocol *iface)
     TRACE("(%p) ref=%d\n", This, ref);
 
     if(!ref) {
-        urlmon_free(This);
+        heap_free(This);
 
         URLMON_UnlockModule();
     }
@@ -191,7 +191,7 @@ HRESULT FtpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
 
     URLMON_LockModule();
 
-    ret = urlmon_alloc(sizeof(FtpProtocol));
+    ret = heap_alloc(sizeof(FtpProtocol));
 
     ret->lpInternetProtocolVtbl = &FtpProtocolVtbl;
     ret->ref = 1;
diff --git a/dlls/urlmon/http.c b/dlls/urlmon/http.c
index a743333..fa759eb 100644
--- a/dlls/urlmon/http.c
+++ b/dlls/urlmon/http.c
@@ -159,7 +159,7 @@ static void HTTPPROTOCOL_Close(HttpProtocol *This)
     if (This->full_header)
     {
         if (This->full_header != wszHeaders)
-            urlmon_free(This->full_header);
+            heap_free(This->full_header);
         This->full_header = 0;
     }
     This->flags = 0;
@@ -234,7 +234,7 @@ static inline LPWSTR strndupW(LPCWSTR string, int len)
 {
     LPWSTR ret = NULL;
     if (string &&
-        (ret = urlmon_alloc((len+1)*sizeof(WCHAR))) != NULL)
+        (ret = heap_alloc((len+1)*sizeof(WCHAR))) != NULL)
     {
         memcpy(ret, string, len*sizeof(WCHAR));
         ret[len] = 0;
@@ -296,7 +296,7 @@ static ULONG WINAPI HttpProtocol_Release(IInternetProtocol *iface)
 
     if(!ref) {
         HTTPPROTOCOL_Close(This);
-        urlmon_free(This);
+        heap_free(This);
 
         URLMON_UnlockModule();
     }
@@ -378,7 +378,7 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
         {
             WARN("ObtainUserAgentString failed: %08x\n", hres);
         }
-        else if (!(user_agenta = urlmon_alloc(len*sizeof(CHAR))))
+        else if (!(user_agenta = heap_alloc(len*sizeof(CHAR))))
         {
             WARN("Out of memory\n");
         }
@@ -393,7 +393,7 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
             else
                 MultiByteToWideChar(CP_ACP, 0, user_agenta, -1, user_agent, len*sizeof(WCHAR));
         }
-        urlmon_free(user_agenta);
+        heap_free(user_agenta);
     }
 
     This->internet = InternetOpenW(user_agent, 0, NULL, NULL, INTERNET_FLAG_ASYNC);
@@ -472,7 +472,7 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
     else
     {
         int len_addl_header = lstrlenW(addl_header);
-        This->full_header = urlmon_alloc(len_addl_header*sizeof(WCHAR)+sizeof(wszHeaders));
+        This->full_header = heap_alloc(len_addl_header*sizeof(WCHAR)+sizeof(wszHeaders));
         if (!This->full_header)
         {
             WARN("Out of memory\n");
@@ -556,10 +556,10 @@ done:
         CoTaskMemFree(accept_mimes[num++]);
     CoTaskMemFree(user_agent);
 
-    urlmon_free(pass);
-    urlmon_free(user);
-    urlmon_free(path);
-    urlmon_free(host);
+    heap_free(pass);
+    heap_free(user);
+    heap_free(path);
+    heap_free(host);
 
     return hres;
 }
@@ -609,7 +609,7 @@ static HRESULT WINAPI HttpProtocol_Continue(IInternetProtocol *iface, PROTOCOLDA
             if ((!HttpQueryInfoW(This->request, HTTP_QUERY_RAW_HEADERS_CRLF, response_headers, &len,
                                  NULL) &&
                  GetLastError() != ERROR_INSUFFICIENT_BUFFER) ||
-                !(response_headers = urlmon_alloc(len)) ||
+                !(response_headers = heap_alloc(len)) ||
                 !HttpQueryInfoW(This->request, HTTP_QUERY_RAW_HEADERS_CRLF, response_headers, &len,
                                 NULL))
             {
@@ -630,7 +630,7 @@ static HRESULT WINAPI HttpProtocol_Continue(IInternetProtocol *iface, PROTOCOLDA
         len = 0;
         if ((!HttpQueryInfoW(This->request, HTTP_QUERY_CONTENT_TYPE, content_type, &len, NULL) &&
              GetLastError() != ERROR_INSUFFICIENT_BUFFER) ||
-            !(content_type = urlmon_alloc(len)) ||
+            !(content_type = heap_alloc(len)) ||
             !HttpQueryInfoW(This->request, HTTP_QUERY_CONTENT_TYPE, content_type, &len, NULL))
         {
             WARN("HttpQueryInfo failed: %d\n", GetLastError());
@@ -656,7 +656,7 @@ static HRESULT WINAPI HttpProtocol_Continue(IInternetProtocol *iface, PROTOCOLDA
         len = 0;
         if ((!HttpQueryInfoW(This->request, HTTP_QUERY_CONTENT_LENGTH, content_length, &len, NULL) &&
              GetLastError() != ERROR_INSUFFICIENT_BUFFER) ||
-            !(content_length = urlmon_alloc(len)) ||
+            !(content_length = heap_alloc(len)) ||
             !HttpQueryInfoW(This->request, HTTP_QUERY_CONTENT_LENGTH, content_length, &len, NULL))
         {
             WARN("HttpQueryInfo failed: %d\n", GetLastError());
@@ -693,9 +693,9 @@ static HRESULT WINAPI HttpProtocol_Continue(IInternetProtocol *iface, PROTOCOLDA
     }
 
 done:
-    urlmon_free(response_headers);
-    urlmon_free(content_type);
-    urlmon_free(content_length);
+    heap_free(response_headers);
+    heap_free(content_type);
+    heap_free(content_length);
 
     /* Returns S_OK on native */
     return S_OK;
@@ -925,7 +925,7 @@ HRESULT HttpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
 
     URLMON_LockModule();
 
-    ret = urlmon_alloc(sizeof(HttpProtocol));
+    ret = heap_alloc(sizeof(HttpProtocol));
 
     ret->lpInternetProtocolVtbl = &HttpProtocolVtbl;
     ret->lpInternetPriorityVtbl = &HttpPriorityVtbl;
diff --git a/dlls/urlmon/mk.c b/dlls/urlmon/mk.c
index 766b50e..031224a 100644
--- a/dlls/urlmon/mk.c
+++ b/dlls/urlmon/mk.c
@@ -88,7 +88,7 @@ static ULONG WINAPI MkProtocol_Release(IInternetProtocol *iface)
         if(This->stream)
             IStream_Release(This->stream);
 
-        urlmon_free(This);
+        heap_free(This);
 
         URLMON_UnlockModule();
     }
@@ -153,11 +153,11 @@ static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
     if(!ptr)
         return report_result(pOIProtSink, INET_E_RESOURCE_NOT_FOUND, ERROR_INVALID_PARAMETER);
 
-    progid = urlmon_alloc((ptr-ptr2+1)*sizeof(WCHAR));
+    progid = heap_alloc((ptr-ptr2+1)*sizeof(WCHAR));
     memcpy(progid, ptr2, (ptr-ptr2)*sizeof(WCHAR));
     progid[ptr-ptr2] = 0;
     hres = CLSIDFromProgID(progid, &clsid);
-    urlmon_free(progid);
+    heap_free(progid);
     if(FAILED(hres))
         return report_result(pOIProtSink, INET_E_RESOURCE_NOT_FOUND, ERROR_INVALID_PARAMETER);
 
@@ -169,10 +169,10 @@ static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
     }
 
     len = strlenW(--ptr2);
-    display_name = urlmon_alloc((len+1)*sizeof(WCHAR));
+    display_name = heap_alloc((len+1)*sizeof(WCHAR));
     memcpy(display_name, ptr2, (len+1)*sizeof(WCHAR));
     hres = IParseDisplayName_ParseDisplayName(pdn, NULL /* FIXME */, display_name, &eaten, &mon);
-    urlmon_free(display_name);
+    heap_free(display_name);
     IParseDisplayName_Release(pdn);
     if(FAILED(hres)) {
         WARN("ParseDisplayName failed: %08x\n", hres);
@@ -307,7 +307,7 @@ HRESULT MkProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
 
     URLMON_LockModule();
 
-    ret = urlmon_alloc(sizeof(MkProtocol));
+    ret = heap_alloc(sizeof(MkProtocol));
 
     ret->lpInternetProtocolVtbl = &MkProtocolVtbl;
     ret->ref = 1;
diff --git a/dlls/urlmon/regsvr.c b/dlls/urlmon/regsvr.c
index eaf86b3..c4c4188 100644
--- a/dlls/urlmon/regsvr.c
+++ b/dlls/urlmon/regsvr.c
@@ -550,7 +550,7 @@ static HRESULT register_inf(BOOL doregister)
     INF_SET_CLSID(MkProtocol);
 
     for(i = 0; i < sizeof(pse)/sizeof(pse[0]); i++) {
-        pse[i].pszValue = urlmon_alloc(39);
+        pse[i].pszValue = heap_alloc(39);
         sprintf(pse[i].pszValue, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
                 clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0],
                 clsids[i]->Data4[1], clsids[i]->Data4[2], clsids[i]->Data4[3], clsids[i]->Data4[4],
@@ -566,7 +566,7 @@ static HRESULT register_inf(BOOL doregister)
     hres = pRegInstall(URLMON_hInstance, doregister ? "RegisterDll" : "UnregisterDll", &strtable);
 
     for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++)
-        urlmon_free(pse[i].pszValue);
+        heap_free(pse[i].pszValue);
 
     return hres;
 }
diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c
index abd2547..83c2183 100644
--- a/dlls/urlmon/sec_mgr.c
+++ b/dlls/urlmon/sec_mgr.c
@@ -173,7 +173,7 @@ static ULONG WINAPI SecManagerImpl_Release(IInternetSecurityManager* iface)
         if(This->custom_manager)
             IInternetSecurityManager_Release(This->custom_manager);
 
-        urlmon_free(This);
+        heap_free(This);
 
         URLMON_UnlockModule();
     }
@@ -260,7 +260,7 @@ static HRESULT WINAPI SecManagerImpl_MapUrlToZone(IInternetSecurityManager *ifac
         FIXME("not supported flags: %08x\n", dwFlags);
 
     size = (strlenW(pwszUrl)+16) * sizeof(WCHAR);
-    url = urlmon_alloc(size);
+    url = heap_alloc(size);
 
     hres = CoInternetParseUrl(pwszUrl, PARSE_SECURITY_URL, 0, url, size/sizeof(WCHAR), &size, 0);
     if(FAILED(hres))
@@ -268,7 +268,7 @@ static HRESULT WINAPI SecManagerImpl_MapUrlToZone(IInternetSecurityManager *ifac
 
     hres = map_url_to_zone(url, pdwZone);
 
-    urlmon_free(url);
+    heap_free(url);
 
     return hres;
 }
@@ -300,7 +300,7 @@ static HRESULT WINAPI SecManagerImpl_GetSecurityId(IInternetSecurityManager *ifa
         FIXME("dwReserved is not supported\n");
 
     len = strlenW(pwszUrl)+1;
-    buf = urlmon_alloc((len+16)*sizeof(WCHAR));
+    buf = heap_alloc((len+16)*sizeof(WCHAR));
 
     hres = CoInternetParseUrl(pwszUrl, PARSE_SECURITY_URL, 0, buf, len, &size, 0);
     if(FAILED(hres))
@@ -308,7 +308,7 @@ static HRESULT WINAPI SecManagerImpl_GetSecurityId(IInternetSecurityManager *ifa
 
     hres = map_url_to_zone(buf, &zone);
     if(FAILED(hres)) {
-        urlmon_free(buf);
+        heap_free(buf);
         return hres == 0x80041001 ? E_INVALIDARG : hres;
     }
 
@@ -318,7 +318,7 @@ static HRESULT WINAPI SecManagerImpl_GetSecurityId(IInternetSecurityManager *ifa
 
         static const BYTE secidFile[] = {'f','i','l','e',':'};
 
-        urlmon_free(buf);
+        heap_free(buf);
 
         if(*pcbSecurityId < sizeof(secidFile)+sizeof(zone))
             return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
@@ -344,12 +344,12 @@ static HRESULT WINAPI SecManagerImpl_GetSecurityId(IInternetSecurityManager *ifa
     len = WideCharToMultiByte(CP_ACP, 0, buf, -1, NULL, 0, NULL, NULL)-1;
 
     if(len+sizeof(DWORD) > *pcbSecurityId) {
-        urlmon_free(buf);
+        heap_free(buf);
         return HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER);
     }
 
     WideCharToMultiByte(CP_ACP, 0, buf, -1, (LPSTR)pbSecurityId, -1, NULL, NULL);
-    urlmon_free(buf);
+    heap_free(buf);
 
     *(DWORD*)(pbSecurityId+len) = zone;
 
@@ -464,7 +464,7 @@ HRESULT SecManagerImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
     SecManagerImpl *This;
 
     TRACE("(%p,%p)\n",pUnkOuter,ppobj);
-    This = urlmon_alloc(sizeof(*This));
+    This = heap_alloc(sizeof(*This));
 
     /* Initialize the virtual function table. */
     This->lpInternetSecurityManagerVtbl = &VT_SecManagerImpl;
@@ -577,7 +577,7 @@ static ULONG WINAPI ZoneMgrImpl_Release(IInternetZoneManager* iface)
     TRACE("(%p)->(ref before=%u)\n",This, refCount + 1);
 
     if(!refCount) {
-        urlmon_free(This);
+        heap_free(This);
         URLMON_UnlockModule();
     }
     
@@ -790,7 +790,7 @@ static const IInternetZoneManagerVtbl ZoneMgrImplVtbl = {
 
 HRESULT ZoneMgrImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
 {
-    ZoneMgrImpl* ret = urlmon_alloc(sizeof(ZoneMgrImpl));
+    ZoneMgrImpl* ret = heap_alloc(sizeof(ZoneMgrImpl));
 
     TRACE("(%p %p)\n", pUnkOuter, ppobj);
     ret->lpVtbl = &ZoneMgrImplVtbl;
diff --git a/dlls/urlmon/session.c b/dlls/urlmon/session.c
index 1532a4f..5c24aec 100644
--- a/dlls/urlmon/session.c
+++ b/dlls/urlmon/session.c
@@ -68,12 +68,12 @@ static HRESULT get_protocol_cf(LPCWSTR schema, DWORD schema_len, CLSID *pclsid,
         {'P','R','O','T','O','C','O','L','S','\\','H','a','n','d','l','e','r','\\'};
     static const WCHAR wszCLSID[] = {'C','L','S','I','D',0};
 
-    wszKey = urlmon_alloc(sizeof(wszProtocolsKey)+(schema_len+1)*sizeof(WCHAR));
+    wszKey = heap_alloc(sizeof(wszProtocolsKey)+(schema_len+1)*sizeof(WCHAR));
     memcpy(wszKey, wszProtocolsKey, sizeof(wszProtocolsKey));
     memcpy(wszKey + sizeof(wszProtocolsKey)/sizeof(WCHAR), schema, (schema_len+1)*sizeof(WCHAR));
 
     res = RegOpenKeyW(HKEY_CLASSES_ROOT, wszKey, &hkey);
-    urlmon_free(wszKey);
+    heap_free(wszKey);
     if(res != ERROR_SUCCESS) {
         TRACE("Could not open protocol handler key\n");
         return E_FAIL;
@@ -207,10 +207,10 @@ static HRESULT WINAPI InternetSession_RegisterNameSpace(IInternetSession *iface,
     if(!pCF || !pwzProtocol)
         return E_INVALIDARG;
 
-    new_name_space = urlmon_alloc(sizeof(name_space));
+    new_name_space = heap_alloc(sizeof(name_space));
 
     size = (strlenW(pwzProtocol)+1)*sizeof(WCHAR);
-    new_name_space->protocol = urlmon_alloc(size);
+    new_name_space->protocol = heap_alloc(size);
     memcpy(new_name_space->protocol, pwzProtocol, size);
 
     IClassFactory_AddRef(pCF);
@@ -247,8 +247,8 @@ static HRESULT WINAPI InternetSession_UnregisterNameSpace(IInternetSession *ifac
         name_space_list = iter->next;
 
     IClassFactory_Release(iter->cf);
-    urlmon_free(iter->protocol);
-    urlmon_free(iter);
+    heap_free(iter->protocol);
+    heap_free(iter);
 
     return S_OK;
 }
diff --git a/dlls/urlmon/umon.c b/dlls/urlmon/umon.c
index 7022be6..e8aae03 100644
--- a/dlls/urlmon/umon.c
+++ b/dlls/urlmon/umon.c
@@ -101,7 +101,7 @@ static ULONG WINAPI Binding_Release(IBinding* iface)
     TRACE("(%p) ref=%d\n",This, ref);
 
     if(!ref) {
-        urlmon_free(This->URLName);
+        heap_free(This->URLName);
         if (This->hCacheFile)
             CloseHandle(This->hCacheFile);
         if (This->pstrCache)
@@ -112,7 +112,7 @@ static ULONG WINAPI Binding_Release(IBinding* iface)
         if (This->pbscb)
             IBindStatusCallback_Release(This->pbscb);
 
-        urlmon_free(This);
+        heap_free(This);
 
         URLMON_UnlockModule();
     }
@@ -356,8 +356,8 @@ static ULONG WINAPI URLMonikerImpl_Release(IMoniker* iface)
 
     /* destroy the object if there's no more reference on it */
     if (!refCount) {
-        urlmon_free(This->URLName);
-        urlmon_free(This);
+        heap_free(This->URLName);
+        heap_free(This);
 
         URLMON_UnlockModule();
     }
@@ -420,8 +420,8 @@ static HRESULT WINAPI URLMonikerImpl_Load(IMoniker* iface,IStream* pStm)
     res = IStream_Read(pStm, &size, sizeof(ULONG), &got);
     if(SUCCEEDED(res)) {
         if(got == sizeof(ULONG)) {
-            urlmon_free(This->URLName);
-            This->URLName = urlmon_alloc(size);
+            heap_free(This->URLName);
+            This->URLName = heap_alloc(size);
             if(!This->URLName)
                 res = E_OUTOFMEMORY;
             else {
@@ -517,13 +517,13 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName,
 	return E_NOTIMPL;
     }
 
-    bind = urlmon_alloc_zero(sizeof(Binding));
+    bind = heap_alloc_zero(sizeof(Binding));
     bind->lpVtbl = &BindingVtbl;
     bind->ref = 1;
     URLMON_LockModule();
 
     len = lstrlenW(URLName)+1;
-    bind->URLName = urlmon_alloc(len*sizeof(WCHAR));
+    bind->URLName = heap_alloc(len*sizeof(WCHAR));
     memcpy(bind->URLName, URLName, len*sizeof(WCHAR));
 
     hres = UMCreateStreamOnCacheFile(bind->URLName, 0, szFileName, &bind->hCacheFile, &bind->pstrCache);
@@ -561,15 +561,15 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName,
                 url.dwStructSize = sizeof(url);
                 url.dwSchemeLength = url.dwHostNameLength = url.dwUrlPathLength = url.dwUserNameLength = url.dwPasswordLength = 1;
                 InternetCrackUrlW(URLName, 0, ICU_ESCAPE, &url);
-                host = urlmon_alloc((url.dwHostNameLength + 1) * sizeof(WCHAR));
+                host = heap_alloc((url.dwHostNameLength + 1) * sizeof(WCHAR));
                 memcpy(host, url.lpszHostName, url.dwHostNameLength * sizeof(WCHAR));
                 host[url.dwHostNameLength] = '\0';
-                path = urlmon_alloc((url.dwUrlPathLength + 1) * sizeof(WCHAR));
+                path = heap_alloc((url.dwUrlPathLength + 1) * sizeof(WCHAR));
                 memcpy(path, url.lpszUrlPath, url.dwUrlPathLength * sizeof(WCHAR));
                 path[url.dwUrlPathLength] = '\0';
                 if (url.dwUserNameLength)
                 {
-                    user = urlmon_alloc(((url.dwUserNameLength + 1) * sizeof(WCHAR)));
+                    user = heap_alloc(((url.dwUserNameLength + 1) * sizeof(WCHAR)));
                     memcpy(user, url.lpszUserName, url.dwUserNameLength * sizeof(WCHAR));
                     user[url.dwUserNameLength] = 0;
                 }
@@ -579,7 +579,7 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName,
                 }
                 if (url.dwPasswordLength)
                 {
-                    pass = urlmon_alloc(((url.dwPasswordLength + 1) * sizeof(WCHAR)));
+                    pass = heap_alloc(((url.dwPasswordLength + 1) * sizeof(WCHAR)));
                     memcpy(pass, url.lpszPassword, url.dwPasswordLength * sizeof(WCHAR));
                     pass[url.dwPasswordLength] = 0;
                 }
@@ -711,10 +711,10 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName,
                 Binding_FinishedDownload(bind, hres);
                 Binding_CloseCacheDownload(bind);
 
-                urlmon_free(user);
-                urlmon_free(pass);
-                urlmon_free(path);
-                urlmon_free(host);
+                heap_free(user);
+                heap_free(pass);
+                heap_free(path);
+                heap_free(host);
             }
         }
     }
@@ -1042,7 +1042,7 @@ static HRESULT URLMonikerImpl_Construct(URLMonikerImpl* This, LPCOLESTR lpszLeft
     This->lpvtbl = &VT_URLMonikerImpl;
     This->ref = 0;
 
-    This->URLName = urlmon_alloc(INTERNET_MAX_URL_LENGTH*sizeof(WCHAR));
+    This->URLName = heap_alloc(INTERNET_MAX_URL_LENGTH*sizeof(WCHAR));
 
     if(lpszLeftURLName)
         hres = CoInternetCombineUrl(lpszLeftURLName, lpszURLName, URL_FILE_USE_PATHURL,
@@ -1052,14 +1052,14 @@ static HRESULT URLMonikerImpl_Construct(URLMonikerImpl* This, LPCOLESTR lpszLeft
                 This->URLName, INTERNET_MAX_URL_LENGTH, &sizeStr, 0);
 
     if(FAILED(hres)) {
-        urlmon_free(This->URLName);
+        heap_free(This->URLName);
         return hres;
     }
 
     URLMON_LockModule();
 
     if(sizeStr != INTERNET_MAX_URL_LENGTH)
-        This->URLName = urlmon_realloc(This->URLName, (sizeStr+1)*sizeof(WCHAR));
+        This->URLName = heap_realloc(This->URLName, (sizeStr+1)*sizeof(WCHAR));
 
     TRACE("URLName = %s\n", debugstr_w(This->URLName));
 
@@ -1092,7 +1092,7 @@ HRESULT WINAPI CreateURLMonikerEx(IMoniker *pmkContext, LPCWSTR szURL, IMoniker
 
     if (dwFlags & URL_MK_UNIFORM) FIXME("ignoring flag URL_MK_UNIFORM\n");
 
-    if(!(obj = urlmon_alloc(sizeof(*obj))))
+    if(!(obj = heap_alloc(sizeof(*obj))))
 	return E_OUTOFMEMORY;
 
     if(pmkContext) {
@@ -1111,7 +1111,7 @@ HRESULT WINAPI CreateURLMonikerEx(IMoniker *pmkContext, LPCWSTR szURL, IMoniker
     if(SUCCEEDED(hres))
 	hres = URLMonikerImpl_QueryInterface((IMoniker*)obj, &IID_IMoniker, (void**)ppmk);
     else
-	urlmon_free(obj);
+	heap_free(obj);
     return hres;
 }
 
@@ -1437,12 +1437,12 @@ HRESULT WINAPI URLDownloadToCacheFileA(LPUNKNOWN lpUnkCaller, LPCSTR szURL, LPST
 
     if(szURL) {
         len = MultiByteToWideChar(CP_ACP, 0, szURL, -1, NULL, 0);
-        url = urlmon_alloc(len*sizeof(WCHAR));
+        url = heap_alloc(len*sizeof(WCHAR));
         MultiByteToWideChar(CP_ACP, 0, szURL, -1, url, -1);
     }
 
     if(szFileName)
-        file_name = urlmon_alloc(dwBufLength*sizeof(WCHAR));
+        file_name = heap_alloc(dwBufLength*sizeof(WCHAR));
 
     hres = URLDownloadToCacheFileW(lpUnkCaller, url, file_name, dwBufLength*sizeof(WCHAR),
             dwReserved, pBSC);
@@ -1450,8 +1450,8 @@ HRESULT WINAPI URLDownloadToCacheFileA(LPUNKNOWN lpUnkCaller, LPCSTR szURL, LPST
     if(SUCCEEDED(hres) && file_name)
         WideCharToMultiByte(CP_ACP, 0, file_name, -1, szFileName, dwBufLength, NULL, NULL);
 
-    urlmon_free(url);
-    urlmon_free(file_name);
+    heap_free(url);
+    heap_free(file_name);
 
     return hres;
 }
diff --git a/dlls/urlmon/umstream.c b/dlls/urlmon/umstream.c
index eeb1570..b70a2cd 100644
--- a/dlls/urlmon/umstream.c
+++ b/dlls/urlmon/umstream.c
@@ -54,7 +54,7 @@ HRESULT UMCreateStreamOnCacheFile(LPCWSTR pszURL,
     HRESULT hr;
 
     size = (strlenW(pszURL)+1)*sizeof(WCHAR);
-    url = urlmon_alloc(size);
+    url = heap_alloc(size);
     memcpy(url, pszURL, size);
 
     for (c = url; *c && *c != '#' && *c != '?'; ++c)
@@ -72,7 +72,7 @@ HRESULT UMCreateStreamOnCacheFile(LPCWSTR pszURL,
     else
        hr = 0;
 
-    urlmon_free(url);
+    heap_free(url);
 
     if (hr)
        return hr;
@@ -99,13 +99,13 @@ HRESULT UMCreateStreamOnCacheFile(LPCWSTR pszURL,
        }
     }
 
-    ucstr = urlmon_alloc_zero(sizeof(IUMCacheStream));
+    ucstr = heap_alloc_zero(sizeof(IUMCacheStream));
     if(ucstr)
     {
-       ucstr->pszURL = urlmon_alloc_zero(sizeof(WCHAR) * (lstrlenW(pszURL) + 1));
+       ucstr->pszURL = heap_alloc_zero(sizeof(WCHAR) * (lstrlenW(pszURL) + 1));
        if (ucstr->pszURL)
        {
-            ucstr->pszFileName = urlmon_alloc_zero(sizeof(WCHAR) * (lstrlenW(pszFileName) + 1));
+            ucstr->pszFileName = heap_alloc_zero(sizeof(WCHAR) * (lstrlenW(pszFileName) + 1));
            if (ucstr->pszFileName)
            {
               ucstr->lpVtbl=&stvt;
@@ -119,9 +119,9 @@ HRESULT UMCreateStreamOnCacheFile(LPCWSTR pszURL,
 
               return S_OK;
            }
-           urlmon_free(ucstr->pszURL);
+           heap_free(ucstr->pszURL);
        }
-       urlmon_free(ucstr);
+       heap_free(ucstr);
     }
     CloseHandle(handle);
     if (phfile)
@@ -207,9 +207,9 @@ static ULONG WINAPI IStream_fnRelease(IStream *iface)
        TRACE(" destroying UMCacheStream (%p)\n",This);
        UMCloseCacheFileStream(This);
        CloseHandle(This->handle);
-       urlmon_free(This->pszFileName);
-       urlmon_free(This->pszURL);
-       urlmon_free(This);
+       heap_free(This->pszFileName);
+       heap_free(This->pszURL);
+       heap_free(This);
     }
     return refCount;
 }
@@ -591,7 +591,7 @@ HRESULT WINAPI URLOpenBlockingStreamA(LPUNKNOWN pCaller, LPCSTR szURL,
         return E_INVALIDARG;
 
     len = MultiByteToWideChar(CP_ACP, 0, szURL, -1, NULL, 0);
-    szURLW = urlmon_alloc(len * sizeof(WCHAR));
+    szURLW = heap_alloc(len * sizeof(WCHAR));
     if (!szURLW)
     {
         *ppStream = NULL;
@@ -601,7 +601,7 @@ HRESULT WINAPI URLOpenBlockingStreamA(LPUNKNOWN pCaller, LPCSTR szURL,
 
     hr = URLOpenBlockingStreamW(pCaller, szURLW, ppStream, dwReserved, lpfnCB);
 
-    urlmon_free(szURLW);
+    heap_free(szURLW);
 
     return hr;
 }
@@ -643,14 +643,14 @@ HRESULT WINAPI URLOpenStreamA(LPUNKNOWN pCaller, LPCSTR szURL, DWORD dwReserved,
         return E_INVALIDARG;
 
     len = MultiByteToWideChar(CP_ACP, 0, szURL, -1, NULL, 0);
-    szURLW = urlmon_alloc(len * sizeof(WCHAR));
+    szURLW = heap_alloc(len * sizeof(WCHAR));
     if (!szURLW)
         return E_OUTOFMEMORY;
     MultiByteToWideChar(CP_ACP, 0, szURL, -1, szURLW, len);
 
     hr = URLOpenStreamW(pCaller, szURLW, dwReserved, lpfnCB);
 
-    urlmon_free(szURLW);
+    heap_free(szURLW);
 
     return hr;
 }
diff --git a/dlls/urlmon/urlmon_main.h b/dlls/urlmon/urlmon_main.h
index aeb0eb2..9f31fb9 100644
--- a/dlls/urlmon/urlmon_main.h
+++ b/dlls/urlmon/urlmon_main.h
@@ -63,22 +63,22 @@ HRESULT start_binding(LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv);
 
 HRESULT create_binding_protocol(LPCWSTR url, IInternetProtocol **protocol);
 
-static inline void *urlmon_alloc(size_t len)
+static inline void *heap_alloc(size_t len)
 {
     return HeapAlloc(GetProcessHeap(), 0, len);
 }
 
-static inline void *urlmon_alloc_zero(size_t len)
+static inline void *heap_alloc_zero(size_t len)
 {
     return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
 }
 
-static inline void *urlmon_realloc(void *mem, size_t len)
+static inline void *heap_realloc(void *mem, size_t len)
 {
     return HeapReAlloc(GetProcessHeap(), 0, mem, len);
 }
 
-static inline BOOL urlmon_free(void *mem)
+static inline BOOL heap_free(void *mem)
 {
     return HeapFree(GetProcessHeap(), 0, mem);
 }
-- 
1.5.3.6

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20071129/12a28bf3/attachment-0001.pgp 


More information about the wine-patches mailing list