shdocvw: Rename the wrappers around HeapAlloc() &Co to use the new standard naming.
This commit is contained in:
parent
241b25b5bd
commit
ac527f1e6c
|
@ -206,10 +206,10 @@ static HRESULT WINAPI ConnectionPoint_Advise(IConnectionPoint *iface, IUnknown *
|
|||
}
|
||||
|
||||
if(i == This->sinks_size)
|
||||
This->sinks = shdocvw_realloc(This->sinks,
|
||||
This->sinks = heap_realloc(This->sinks,
|
||||
(++This->sinks_size)*sizeof(*This->sinks));
|
||||
}else {
|
||||
This->sinks = shdocvw_alloc(sizeof(*This->sinks));
|
||||
This->sinks = heap_alloc(sizeof(*This->sinks));
|
||||
This->sinks_size = 1;
|
||||
i = 0;
|
||||
}
|
||||
|
@ -271,7 +271,7 @@ void call_sink(ConnectionPoint *This, DISPID dispid, DISPPARAMS *dispparams)
|
|||
static void ConnectionPoint_Create(REFIID riid, ConnectionPoint **cp,
|
||||
IConnectionPointContainer *container)
|
||||
{
|
||||
ConnectionPoint *ret = shdocvw_alloc(sizeof(ConnectionPoint));
|
||||
ConnectionPoint *ret = heap_alloc(sizeof(ConnectionPoint));
|
||||
|
||||
ret->lpConnectionPointVtbl = &ConnectionPointVtbl;
|
||||
|
||||
|
@ -293,8 +293,8 @@ static void ConnectionPoint_Destroy(ConnectionPoint *This)
|
|||
IDispatch_Release(This->sinks[i]);
|
||||
}
|
||||
|
||||
shdocvw_free(This->sinks);
|
||||
shdocvw_free(This);
|
||||
heap_free(This->sinks);
|
||||
heap_free(This);
|
||||
}
|
||||
|
||||
void ConnectionPointContainer_Init(ConnectionPointContainer *This, IUnknown *impl)
|
||||
|
|
|
@ -75,7 +75,7 @@ static ULONG WINAPI InternetExplorer_Release(IWebBrowser2 *iface)
|
|||
|
||||
if(!ref) {
|
||||
DocHost_Release(&This->doc_host);
|
||||
shdocvw_free(This);
|
||||
heap_free(This);
|
||||
}
|
||||
|
||||
return ref;
|
||||
|
|
|
@ -161,7 +161,7 @@ HRESULT InternetExplorer_Create(IUnknown *pOuter, REFIID riid, void **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->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);
|
||||
if(FAILED(hres)) {
|
||||
shdocvw_free(ret);
|
||||
heap_free(ret);
|
||||
return hres;
|
||||
}
|
||||
|
||||
|
|
|
@ -137,8 +137,8 @@ static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface)
|
|||
if(!ref) {
|
||||
if(This->post_data)
|
||||
GlobalFree(This->post_data);
|
||||
shdocvw_free(This->headers);
|
||||
shdocvw_free(This);
|
||||
heap_free(This->headers);
|
||||
heap_free(This);
|
||||
}
|
||||
|
||||
return ref;
|
||||
|
@ -293,7 +293,7 @@ static const IHttpNegotiateVtbl HttpNegotiateVtbl = {
|
|||
static IBindStatusCallback *create_callback(DocHost *This, PBYTE post_data,
|
||||
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->lpHttpNegotiateVtbl = &HttpNegotiateVtbl;
|
||||
|
@ -310,7 +310,7 @@ static IBindStatusCallback *create_callback(DocHost *This, PBYTE post_data,
|
|||
|
||||
if(headers) {
|
||||
int size = (strlenW(headers)+1)*sizeof(WCHAR);
|
||||
ret->headers = shdocvw_alloc(size);
|
||||
ret->headers = heap_alloc(size);
|
||||
memcpy(ret->headers, headers, size);
|
||||
}
|
||||
|
||||
|
|
|
@ -226,17 +226,17 @@ DWORD register_iexplore(BOOL);
|
|||
|
||||
/* memory allocation functions */
|
||||
|
||||
static inline void *shdocvw_alloc(size_t len)
|
||||
static inline void *heap_alloc(size_t 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);
|
||||
}
|
||||
|
||||
static inline BOOL shdocvw_free(void *mem)
|
||||
static inline BOOL heap_free(void *mem)
|
||||
{
|
||||
return HeapFree(GetProcessHeap(), 0, mem);
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ static void RegistryPropertyBag_Destroy(RegistryPropertyBag *This) {
|
|||
TRACE("This=%p)\n", This);
|
||||
|
||||
RegCloseKey(This->m_hInitPropertyBagKey);
|
||||
shdocvw_free(This);
|
||||
heap_free(This);
|
||||
}
|
||||
|
||||
static HRESULT WINAPI RegistryPropertyBag_IPropertyBag_QueryInterface(IPropertyBag *iface,
|
||||
|
@ -130,20 +130,20 @@ static HRESULT WINAPI RegistryPropertyBag_IPropertyBag_Read(IPropertyBag *iface,
|
|||
if (res != ERROR_SUCCESS)
|
||||
return E_INVALIDARG;
|
||||
|
||||
pwszValue = shdocvw_alloc(cbData);
|
||||
pwszValue = heap_alloc(cbData);
|
||||
if (!pwszValue)
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
res = RegQueryValueExW(This->m_hInitPropertyBagKey, pwszPropName, NULL, &dwType,
|
||||
(LPBYTE)pwszValue, &cbData);
|
||||
if (res != ERROR_SUCCESS) {
|
||||
shdocvw_free(pwszValue);
|
||||
heap_free(pwszValue);
|
||||
return E_INVALIDARG;
|
||||
}
|
||||
|
||||
V_VT(pVar) = VT_BSTR;
|
||||
V_BSTR(pVar) = SysAllocString(pwszValue);
|
||||
shdocvw_free(pwszValue);
|
||||
heap_free(pwszValue);
|
||||
|
||||
if (vtDst != VT_BSTR) {
|
||||
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,
|
||||
debugstr_guid(riid), ppvObject);
|
||||
|
||||
pRegistryPropertyBag = shdocvw_alloc(sizeof(RegistryPropertyBag));
|
||||
pRegistryPropertyBag = heap_alloc(sizeof(RegistryPropertyBag));
|
||||
if (pRegistryPropertyBag) {
|
||||
pRegistryPropertyBag->lpIPropertyBagVtbl = &RegistryPropertyBag_IPropertyBagVtbl;
|
||||
pRegistryPropertyBag->m_cRef = 0;
|
||||
|
@ -206,7 +206,7 @@ typedef struct _InstanceObjectFactory {
|
|||
|
||||
static void InstanceObjectFactory_Destroy(InstanceObjectFactory *This) {
|
||||
IPropertyBag_Release(This->m_pPropertyBag);
|
||||
shdocvw_free(This);
|
||||
heap_free(This);
|
||||
}
|
||||
|
||||
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,
|
||||
debugstr_guid(riid), ppvObject);
|
||||
|
||||
pInstanceObjectFactory = shdocvw_alloc(sizeof(InstanceObjectFactory));
|
||||
pInstanceObjectFactory = heap_alloc(sizeof(InstanceObjectFactory));
|
||||
if (pInstanceObjectFactory) {
|
||||
pInstanceObjectFactory->lpIClassFactoryVtbl = &InstanceObjectFactory_IClassFactoryVtbl;
|
||||
pInstanceObjectFactory->m_cRef = 0;
|
||||
|
|
|
@ -148,7 +148,7 @@ static ULONG WINAPI WebBrowser_Release(IWebBrowser2 *iface)
|
|||
|
||||
WebBrowser_OleObject_Destroy(This);
|
||||
|
||||
shdocvw_free(This);
|
||||
heap_free(This);
|
||||
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);
|
||||
|
||||
ret = shdocvw_alloc(sizeof(WebBrowser));
|
||||
ret = heap_alloc(sizeof(WebBrowser));
|
||||
|
||||
ret->lpWebBrowser2Vtbl = &WebBrowser2Vtbl;
|
||||
ret->ref = 0;
|
||||
|
@ -970,7 +970,7 @@ static HRESULT WebBrowser_Create(INT version, IUnknown *pOuter, REFIID riid, voi
|
|||
if(SUCCEEDED(hres)) {
|
||||
SHDOCVW_LockModule();
|
||||
}else {
|
||||
shdocvw_free(ret);
|
||||
heap_free(ret);
|
||||
return hres;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue