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

This commit is contained in:
Michael Stefaniuc 2007-11-28 00:09:35 +01:00 committed by Alexandre Julliard
parent 241b25b5bd
commit ac527f1e6c
7 changed files with 25 additions and 25 deletions

View File

@ -206,10 +206,10 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
} }
if(i == This->sinks_size) if(i == This->sinks_size)
This->sinks = shdocvw_realloc(This->sinks, This->sinks = heap_realloc(This->sinks,
(++This->sinks_size)*sizeof(*This->sinks)); (++This->sinks_size)*sizeof(*This->sinks));
}else { }else {
This->sinks = shdocvw_alloc(sizeof(*This->sinks)); This->sinks = heap_alloc(sizeof(*This->sinks));
This->sinks_size = 1; This->sinks_size = 1;
i = 0; i = 0;
} }
@ -271,7 +271,7 @@ void call_sink(ConnectionPoint *This, DISPID dispid, DISPPARAMS *dispparams)
static void ConnectionPoint_Create(REFIID riid, ConnectionPoint **cp, static void ConnectionPoint_Create(REFIID riid, ConnectionPoint **cp,
IConnectionPointContainer *container) IConnectionPointContainer *container)
{ {
ConnectionPoint *ret = shdocvw_alloc(sizeof(ConnectionPoint)); ConnectionPoint *ret = heap_alloc(sizeof(ConnectionPoint));
ret->lpConnectionPointVtbl = &ConnectionPointVtbl; ret->lpConnectionPointVtbl = &ConnectionPointVtbl;
@ -293,8 +293,8 @@ static void ConnectionPoint_Destroy(ConnectionPoint *This)
IDispatch_Release(This->sinks[i]); IDispatch_Release(This->sinks[i]);
} }
shdocvw_free(This->sinks); heap_free(This->sinks);
shdocvw_free(This); heap_free(This);
} }
void ConnectionPointContainer_Init(ConnectionPointContainer *This, IUnknown *impl) void ConnectionPointContainer_Init(ConnectionPointContainer *This, IUnknown *impl)

View File

@ -75,7 +75,7 @@ static ULONG WINAPI InternetExplorer_Release(IWebBrowser2 *iface)
if(!ref) { if(!ref) {
DocHost_Release(&This->doc_host); DocHost_Release(&This->doc_host);
shdocvw_free(This); heap_free(This);
} }
return ref; return ref;

View File

@ -161,7 +161,7 @@ HRESULT InternetExplorer_Create(IUnknown *pOuter, REFIID riid, void **ppv)
TRACE("(%p %s %p)\n", pOuter, debugstr_guid(riid), ppv); TRACE("(%p %s %p)\n", pOuter, debugstr_guid(riid), ppv);
ret = shdocvw_alloc(sizeof(InternetExplorer)); ret = heap_alloc(sizeof(InternetExplorer));
ret->ref = 0; ret->ref = 0;
ret->doc_host.disp = (IDispatch*)WEBBROWSER2(ret); ret->doc_host.disp = (IDispatch*)WEBBROWSER2(ret);
@ -174,7 +174,7 @@ HRESULT InternetExplorer_Create(IUnknown *pOuter, REFIID riid, void **ppv)
hres = IWebBrowser2_QueryInterface(WEBBROWSER2(ret), riid, ppv); hres = IWebBrowser2_QueryInterface(WEBBROWSER2(ret), riid, ppv);
if(FAILED(hres)) { if(FAILED(hres)) {
shdocvw_free(ret); heap_free(ret);
return hres; return hres;
} }

View File

@ -137,8 +137,8 @@ static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface)
if(!ref) { if(!ref) {
if(This->post_data) if(This->post_data)
GlobalFree(This->post_data); GlobalFree(This->post_data);
shdocvw_free(This->headers); heap_free(This->headers);
shdocvw_free(This); heap_free(This);
} }
return ref; return ref;
@ -293,7 +293,7 @@ static const IHttpNegotiateVtbl HttpNegotiateVtbl = {
static IBindStatusCallback *create_callback(DocHost *This, PBYTE post_data, static IBindStatusCallback *create_callback(DocHost *This, PBYTE post_data,
ULONG post_data_len, LPWSTR headers, VARIANT_BOOL *cancel) ULONG post_data_len, LPWSTR headers, VARIANT_BOOL *cancel)
{ {
BindStatusCallback *ret = shdocvw_alloc(sizeof(BindStatusCallback)); BindStatusCallback *ret = heap_alloc(sizeof(BindStatusCallback));
ret->lpBindStatusCallbackVtbl = &BindStatusCallbackVtbl; ret->lpBindStatusCallbackVtbl = &BindStatusCallbackVtbl;
ret->lpHttpNegotiateVtbl = &HttpNegotiateVtbl; ret->lpHttpNegotiateVtbl = &HttpNegotiateVtbl;
@ -310,7 +310,7 @@ static IBindStatusCallback *create_callback(DocHost *This, PBYTE post_data,
if(headers) { if(headers) {
int size = (strlenW(headers)+1)*sizeof(WCHAR); int size = (strlenW(headers)+1)*sizeof(WCHAR);
ret->headers = shdocvw_alloc(size); ret->headers = heap_alloc(size);
memcpy(ret->headers, headers, size); memcpy(ret->headers, headers, size);
} }

View File

@ -226,17 +226,17 @@ DWORD register_iexplore(BOOL);
/* memory allocation functions */ /* memory allocation functions */
static inline void *shdocvw_alloc(size_t len) static inline void *heap_alloc(size_t len)
{ {
return HeapAlloc(GetProcessHeap(), 0, len); return HeapAlloc(GetProcessHeap(), 0, len);
} }
static inline void *shdocvw_realloc(void *mem, size_t len) static inline void *heap_realloc(void *mem, size_t len)
{ {
return HeapReAlloc(GetProcessHeap(), 0, mem, len); return HeapReAlloc(GetProcessHeap(), 0, mem, len);
} }
static inline BOOL shdocvw_free(void *mem) static inline BOOL heap_free(void *mem)
{ {
return HeapFree(GetProcessHeap(), 0, mem); return HeapFree(GetProcessHeap(), 0, mem);
} }

View File

@ -59,7 +59,7 @@ static void RegistryPropertyBag_Destroy(RegistryPropertyBag *This) {
TRACE("This=%p)\n", This); TRACE("This=%p)\n", This);
RegCloseKey(This->m_hInitPropertyBagKey); RegCloseKey(This->m_hInitPropertyBagKey);
shdocvw_free(This); heap_free(This);
} }
static HRESULT WINAPI RegistryPropertyBag_IPropertyBag_QueryInterface(IPropertyBag *iface, static HRESULT WINAPI RegistryPropertyBag_IPropertyBag_QueryInterface(IPropertyBag *iface,
@ -130,20 +130,20 @@ static HRESULT WINAPI RegistryPropertyBag_IPropertyBag_Read(IPropertyBag *iface,
if (res != ERROR_SUCCESS) if (res != ERROR_SUCCESS)
return E_INVALIDARG; return E_INVALIDARG;
pwszValue = shdocvw_alloc(cbData); pwszValue = heap_alloc(cbData);
if (!pwszValue) if (!pwszValue)
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
res = RegQueryValueExW(This->m_hInitPropertyBagKey, pwszPropName, NULL, &dwType, res = RegQueryValueExW(This->m_hInitPropertyBagKey, pwszPropName, NULL, &dwType,
(LPBYTE)pwszValue, &cbData); (LPBYTE)pwszValue, &cbData);
if (res != ERROR_SUCCESS) { if (res != ERROR_SUCCESS) {
shdocvw_free(pwszValue); heap_free(pwszValue);
return E_INVALIDARG; return E_INVALIDARG;
} }
V_VT(pVar) = VT_BSTR; V_VT(pVar) = VT_BSTR;
V_BSTR(pVar) = SysAllocString(pwszValue); V_BSTR(pVar) = SysAllocString(pwszValue);
shdocvw_free(pwszValue); heap_free(pwszValue);
if (vtDst != VT_BSTR) { if (vtDst != VT_BSTR) {
hr = VariantChangeTypeEx(pVar, pVar, LOCALE_SYSTEM_DEFAULT, 0, vtDst); hr = VariantChangeTypeEx(pVar, pVar, LOCALE_SYSTEM_DEFAULT, 0, vtDst);
@ -176,7 +176,7 @@ static HRESULT RegistryPropertyBag_Constructor(HKEY hInitPropertyBagKey, REFIID
TRACE("(hInitPropertyBagKey=%p, riid=%s, ppvObject=%p)\n", hInitPropertyBagKey, TRACE("(hInitPropertyBagKey=%p, riid=%s, ppvObject=%p)\n", hInitPropertyBagKey,
debugstr_guid(riid), ppvObject); debugstr_guid(riid), ppvObject);
pRegistryPropertyBag = shdocvw_alloc(sizeof(RegistryPropertyBag)); pRegistryPropertyBag = heap_alloc(sizeof(RegistryPropertyBag));
if (pRegistryPropertyBag) { if (pRegistryPropertyBag) {
pRegistryPropertyBag->lpIPropertyBagVtbl = &RegistryPropertyBag_IPropertyBagVtbl; pRegistryPropertyBag->lpIPropertyBagVtbl = &RegistryPropertyBag_IPropertyBagVtbl;
pRegistryPropertyBag->m_cRef = 0; pRegistryPropertyBag->m_cRef = 0;
@ -206,7 +206,7 @@ typedef struct _InstanceObjectFactory {
static void InstanceObjectFactory_Destroy(InstanceObjectFactory *This) { static void InstanceObjectFactory_Destroy(InstanceObjectFactory *This) {
IPropertyBag_Release(This->m_pPropertyBag); IPropertyBag_Release(This->m_pPropertyBag);
shdocvw_free(This); heap_free(This);
} }
static HRESULT WINAPI InstanceObjectFactory_IClassFactory_QueryInterface(IClassFactory *iface, static HRESULT WINAPI InstanceObjectFactory_IClassFactory_QueryInterface(IClassFactory *iface,
@ -322,7 +322,7 @@ static HRESULT InstanceObjectFactory_Constructor(REFCLSID rclsid, IPropertyBag *
TRACE("(RegistryPropertyBag=%p, riid=%s, ppvObject=%p)\n", pPropertyBag, TRACE("(RegistryPropertyBag=%p, riid=%s, ppvObject=%p)\n", pPropertyBag,
debugstr_guid(riid), ppvObject); debugstr_guid(riid), ppvObject);
pInstanceObjectFactory = shdocvw_alloc(sizeof(InstanceObjectFactory)); pInstanceObjectFactory = heap_alloc(sizeof(InstanceObjectFactory));
if (pInstanceObjectFactory) { if (pInstanceObjectFactory) {
pInstanceObjectFactory->lpIClassFactoryVtbl = &InstanceObjectFactory_IClassFactoryVtbl; pInstanceObjectFactory->lpIClassFactoryVtbl = &InstanceObjectFactory_IClassFactoryVtbl;
pInstanceObjectFactory->m_cRef = 0; pInstanceObjectFactory->m_cRef = 0;

View File

@ -148,7 +148,7 @@ static ULONG WINAPI WebBrowser_Release(IWebBrowser2 *iface)
WebBrowser_OleObject_Destroy(This); WebBrowser_OleObject_Destroy(This);
shdocvw_free(This); heap_free(This);
SHDOCVW_UnlockModule(); SHDOCVW_UnlockModule();
} }
@ -945,7 +945,7 @@ static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, voi
TRACE("(%p %s %p) version=%d\n", pOuter, debugstr_guid(riid), ppv, version); TRACE("(%p %s %p) version=%d\n", pOuter, debugstr_guid(riid), ppv, version);
ret = shdocvw_alloc(sizeof(WebBrowser)); ret = heap_alloc(sizeof(WebBrowser));
ret->lpWebBrowser2Vtbl = &WebBrowser2Vtbl; ret->lpWebBrowser2Vtbl = &WebBrowser2Vtbl;
ret->ref = 0; ret->ref = 0;
@ -970,7 +970,7 @@ static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, voi
if(SUCCEEDED(hres)) { if(SUCCEEDED(hres)) {
SHDOCVW_LockModule(); SHDOCVW_LockModule();
}else { }else {
shdocvw_free(ret); heap_free(ret);
return hres; return hres;
} }