Wine-devel
Threads by month
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
January 2022
- 86 participants
- 717 discussions
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/scrrun/Makefile.in | 1 -
dlls/scrrun/dictionary.c | 22 ++--
dlls/scrrun/filesystem.c | 216 ++++++++++++++++++++-------------------
dlls/scrrun/scrrun.c | 6 +-
4 files changed, 122 insertions(+), 123 deletions(-)
diff --git a/dlls/scrrun/Makefile.in b/dlls/scrrun/Makefile.in
index c0beae245ef..31ef016f48e 100644
--- a/dlls/scrrun/Makefile.in
+++ b/dlls/scrrun/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = scrrun.dll
IMPORTS = uuid oleaut32 version advapi32
diff --git a/dlls/scrrun/dictionary.c b/dlls/scrrun/dictionary.c
index d1c6eb24e0b..bb9c3610d1b 100644
--- a/dlls/scrrun/dictionary.c
+++ b/dlls/scrrun/dictionary.c
@@ -240,7 +240,7 @@ static ULONG WINAPI dict_enum_AddRef(IEnumVARIANT *iface)
{
struct dictionary_enum *This = impl_from_IEnumVARIANT(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%u)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -249,7 +249,7 @@ static ULONG WINAPI dict_enum_Release(IEnumVARIANT *iface)
struct dictionary_enum *This = impl_from_IEnumVARIANT(iface);
LONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%u)\n", This, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (!ref)
{
@@ -267,7 +267,7 @@ static HRESULT WINAPI dict_enum_Next(IEnumVARIANT *iface, ULONG count, VARIANT *
struct keyitem_pair *pair;
ULONG i = 0;
- TRACE("(%p)->(%u %p %p)\n", This, count, keys, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, count, keys, fetched);
if (fetched)
*fetched = 0;
@@ -292,7 +292,7 @@ static HRESULT WINAPI dict_enum_Skip(IEnumVARIANT *iface, ULONG count)
{
struct dictionary_enum *This = impl_from_IEnumVARIANT(iface);
- TRACE("(%p)->(%u)\n", This, count);
+ TRACE("%p, %lu.\n", iface, count);
if (!count)
return S_OK;
@@ -418,7 +418,7 @@ static ULONG WINAPI dictionary_AddRef(IDictionary *iface)
struct dictionary *dictionary = impl_from_IDictionary(iface);
ULONG ref = InterlockedIncrement(&dictionary->ref);
- TRACE("%p, refcount %u.\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
return ref;
}
@@ -428,7 +428,7 @@ static ULONG WINAPI dictionary_Release(IDictionary *iface)
struct dictionary *dictionary = impl_from_IDictionary(iface);
ULONG ref = InterlockedDecrement(&dictionary->ref);
- TRACE("%p, refcount %u.\n", iface, ref);
+ TRACE("%p, refcount %lu.\n", iface, ref);
if (!ref)
{
@@ -449,7 +449,7 @@ static HRESULT WINAPI dictionary_GetTypeInfoCount(IDictionary *iface, UINT *pcti
static HRESULT WINAPI dictionary_GetTypeInfo(IDictionary *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
{
- TRACE("%p, %u, %u, %p.\n", iface, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
return get_typeinfo(IDictionary_tid, ppTInfo);
}
@@ -460,7 +460,7 @@ static HRESULT WINAPI dictionary_GetIDsOfNames(IDictionary *iface, REFIID riid,
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("%p, %s, %p, %u, %u, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
hr = get_typeinfo(IDictionary_tid, &typeinfo);
if(SUCCEEDED(hr))
@@ -476,18 +476,16 @@ static HRESULT WINAPI dictionary_Invoke(IDictionary *iface, DISPID dispIdMember,
LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult,
EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
- struct dictionary *dictionary = impl_from_IDictionary(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("%p, %d, %s, %d, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IDictionary_tid, &typeinfo);
if(SUCCEEDED(hr))
{
- hr = ITypeInfo_Invoke(typeinfo, &dictionary->IDictionary_iface, dispIdMember, wFlags,
- pDispParams, pVarResult, pExcepInfo, puArgErr);
+ hr = ITypeInfo_Invoke(typeinfo, iface, dispIdMember, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
ITypeInfo_Release(typeinfo);
}
diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index e525b9db8da..2b2255e1dfc 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -187,7 +187,7 @@ static inline HRESULT create_error(DWORD err)
case ERROR_FILE_EXISTS: return CTL_E_FILEALREADYEXISTS;
case ERROR_ALREADY_EXISTS: return CTL_E_FILEALREADYEXISTS;
default:
- FIXME("Unsupported error code: %d\n", err);
+ FIXME("Unsupported error code: %ld\n", err);
return E_FAIL;
}
}
@@ -308,9 +308,11 @@ static HRESULT WINAPI textstream_QueryInterface(ITextStream *iface, REFIID riid,
static ULONG WINAPI textstream_AddRef(ITextStream *iface)
{
- struct textstream *This = impl_from_ITextStream(iface);
- ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ struct textstream *stream = impl_from_ITextStream(iface);
+ ULONG ref = InterlockedIncrement(&stream->ref);
+
+ TRACE("%p, refcount %ld.\n", iface, ref);
+
return ref;
}
@@ -319,7 +321,7 @@ static ULONG WINAPI textstream_Release(ITextStream *iface)
struct textstream *stream = impl_from_ITextStream(iface);
ULONG ref = InterlockedDecrement(&stream->ref);
- TRACE("%p, refcount %d.\n", iface, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
if (!ref)
{
@@ -342,8 +344,8 @@ static HRESULT WINAPI textstream_GetTypeInfoCount(ITextStream *iface, UINT *pcti
static HRESULT WINAPI textstream_GetTypeInfo(ITextStream *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
- struct textstream *This = impl_from_ITextStream(iface);
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
+
return get_typeinfo(ITextStream_tid, ppTInfo);
}
@@ -351,11 +353,10 @@ static HRESULT WINAPI textstream_GetIDsOfNames(ITextStream *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames,
LCID lcid, DISPID *rgDispId)
{
- struct textstream *This = impl_from_ITextStream(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
hr = get_typeinfo(ITextStream_tid, &typeinfo);
if(SUCCEEDED(hr))
@@ -372,11 +373,10 @@ static HRESULT WINAPI textstream_Invoke(ITextStream *iface, DISPID dispIdMember,
DISPPARAMS *pDispParams, VARIANT *pVarResult,
EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
- struct textstream *This = impl_from_ITextStream(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(ITextStream_tid, &typeinfo);
@@ -513,7 +513,7 @@ static HRESULT WINAPI textstream_Read(ITextStream *iface, LONG len, BSTR *text)
struct textstream *This = impl_from_ITextStream(iface);
HRESULT hr = S_OK;
- TRACE("(%p)->(%d %p)\n", This, len, text);
+ TRACE("%p, %ld, %p.\n", iface, len, text);
if (!text)
return E_POINTER;
@@ -685,15 +685,15 @@ static HRESULT WINAPI textstream_WriteLine(ITextStream *iface, BSTR text)
static HRESULT WINAPI textstream_WriteBlankLines(ITextStream *iface, LONG lines)
{
- struct textstream *This = impl_from_ITextStream(iface);
- FIXME("(%p)->(%d): stub\n", This, lines);
+ FIXME("%p, %ld stub\n", iface, lines);
+
return E_NOTIMPL;
}
static HRESULT WINAPI textstream_Skip(ITextStream *iface, LONG count)
{
- struct textstream *This = impl_from_ITextStream(iface);
- FIXME("(%p)->(%d): stub\n", This, count);
+ FIXME("%p, %ld stub\n", iface, count);
+
return E_NOTIMPL;
}
@@ -866,9 +866,11 @@ static HRESULT WINAPI drive_QueryInterface(IDrive *iface, REFIID riid, void **ob
static ULONG WINAPI drive_AddRef(IDrive *iface)
{
- struct drive *This = impl_from_IDrive(iface);
- ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ struct drive *drive = impl_from_IDrive(iface);
+ ULONG ref = InterlockedIncrement(&drive->ref);
+
+ TRACE("%p, refcount %ld.\n", iface, ref);
+
return ref;
}
@@ -877,7 +879,7 @@ static ULONG WINAPI drive_Release(IDrive *iface)
struct drive *drive = impl_from_IDrive(iface);
ULONG ref = InterlockedDecrement(&drive->ref);
- TRACE("%p, refcount %d.\n", iface, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
if (!ref)
free(drive);
@@ -896,8 +898,8 @@ static HRESULT WINAPI drive_GetTypeInfoCount(IDrive *iface, UINT *pctinfo)
static HRESULT WINAPI drive_GetTypeInfo(IDrive *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
- struct drive *This = impl_from_IDrive(iface);
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
+
return get_typeinfo(IDrive_tid, ppTInfo);
}
@@ -905,11 +907,10 @@ static HRESULT WINAPI drive_GetIDsOfNames(IDrive *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames,
LCID lcid, DISPID *rgDispId)
{
- struct drive *This = impl_from_IDrive(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
hr = get_typeinfo(IDrive_tid, &typeinfo);
if(SUCCEEDED(hr))
@@ -926,11 +927,10 @@ static HRESULT WINAPI drive_Invoke(IDrive *iface, DISPID dispIdMember,
DISPPARAMS *pDispParams, VARIANT *pVarResult,
EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
- struct drive *This = impl_from_IDrive(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IDrive_tid, &typeinfo);
@@ -1218,7 +1218,7 @@ static ULONG WINAPI enumvariant_AddRef(IEnumVARIANT *iface)
{
struct enumvariant *This = impl_from_IEnumVARIANT(iface);
ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
return ref;
}
@@ -1227,7 +1227,7 @@ static ULONG WINAPI foldercoll_enumvariant_Release(IEnumVARIANT *iface)
struct enumvariant *This = impl_from_IEnumVARIANT(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
if (!ref)
{
@@ -1274,7 +1274,7 @@ static HRESULT WINAPI foldercoll_enumvariant_Next(IEnumVARIANT *iface, ULONG cel
WIN32_FIND_DATAW data;
ULONG count = 0;
- TRACE("(%p)->(%d %p %p)\n", This, celt, var, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, var, fetched);
if (fetched)
*fetched = 0;
@@ -1327,7 +1327,7 @@ static HRESULT WINAPI foldercoll_enumvariant_Skip(IEnumVARIANT *iface, ULONG cel
HANDLE handle = This->data.u.foldercoll.find;
WIN32_FIND_DATAW data;
- TRACE("(%p)->(%d)\n", This, celt);
+ TRACE("%p, %lu.\n", iface, celt);
if (!celt) return S_OK;
@@ -1409,7 +1409,7 @@ static ULONG WINAPI filecoll_enumvariant_Release(IEnumVARIANT *iface)
struct enumvariant *This = impl_from_IEnumVARIANT(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
if (!ref)
{
@@ -1428,7 +1428,7 @@ static HRESULT WINAPI filecoll_enumvariant_Next(IEnumVARIANT *iface, ULONG celt,
WIN32_FIND_DATAW data;
ULONG count = 0;
- TRACE("(%p)->(%d %p %p)\n", This, celt, var, fetched);
+ TRACE("%p, %ld, %p, %p.\n", iface, celt, var, fetched);
if (fetched)
*fetched = 0;
@@ -1475,7 +1475,7 @@ static HRESULT WINAPI filecoll_enumvariant_Skip(IEnumVARIANT *iface, ULONG celt)
HANDLE handle = This->data.u.filecoll.find;
WIN32_FIND_DATAW data;
- TRACE("(%p)->(%d)\n", This, celt);
+ TRACE("%p, %lu.\n", iface, celt);
if (!celt) return S_OK;
@@ -1551,7 +1551,7 @@ static ULONG WINAPI drivecoll_enumvariant_Release(IEnumVARIANT *iface)
struct enumvariant *This = impl_from_IEnumVARIANT(iface);
ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
if (!ref)
{
@@ -1581,7 +1581,7 @@ static HRESULT WINAPI drivecoll_enumvariant_Next(IEnumVARIANT *iface, ULONG celt
struct enumvariant *This = impl_from_IEnumVARIANT(iface);
ULONG count = 0;
- TRACE("(%p)->(%d %p %p)\n", This, celt, var, fetched);
+ TRACE("%p, %lu, %p, %p.\n", iface, celt, var, fetched);
if (fetched)
*fetched = 0;
@@ -1612,7 +1612,7 @@ static HRESULT WINAPI drivecoll_enumvariant_Skip(IEnumVARIANT *iface, ULONG celt
{
struct enumvariant *This = impl_from_IEnumVARIANT(iface);
- TRACE("(%p)->(%d)\n", This, celt);
+ TRACE("%p, %lu.\n", iface, celt);
if (!celt) return S_OK;
@@ -1696,22 +1696,25 @@ static HRESULT WINAPI foldercoll_QueryInterface(IFolderCollection *iface, REFIID
static ULONG WINAPI foldercoll_AddRef(IFolderCollection *iface)
{
- struct foldercollection *This = impl_from_IFolderCollection(iface);
- ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ struct foldercollection *collection = impl_from_IFolderCollection(iface);
+ ULONG ref = InterlockedIncrement(&collection->ref);
+
+ TRACE("%p, refcount %ld.\n", iface, ref);
+
return ref;
}
static ULONG WINAPI foldercoll_Release(IFolderCollection *iface)
{
- struct foldercollection *This = impl_from_IFolderCollection(iface);
- ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ struct foldercollection *collection = impl_from_IFolderCollection(iface);
+ ULONG ref = InterlockedDecrement(&collection->ref);
+
+ TRACE("%p, refcount %ld.\n", iface, ref);
if (!ref)
{
- SysFreeString(This->path);
- free(This);
+ SysFreeString(collection->path);
+ free(collection);
}
return ref;
@@ -1728,8 +1731,8 @@ static HRESULT WINAPI foldercoll_GetTypeInfoCount(IFolderCollection *iface, UINT
static HRESULT WINAPI foldercoll_GetTypeInfo(IFolderCollection *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
- struct foldercollection *This = impl_from_IFolderCollection(iface);
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
+
return get_typeinfo(IFolderCollection_tid, ppTInfo);
}
@@ -1737,11 +1740,10 @@ static HRESULT WINAPI foldercoll_GetIDsOfNames(IFolderCollection *iface, REFIID
LPOLESTR *rgszNames, UINT cNames,
LCID lcid, DISPID *rgDispId)
{
- struct foldercollection *This = impl_from_IFolderCollection(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
hr = get_typeinfo(IFolderCollection_tid, &typeinfo);
if(SUCCEEDED(hr))
@@ -1758,11 +1760,10 @@ static HRESULT WINAPI foldercoll_Invoke(IFolderCollection *iface, DISPID dispIdM
DISPPARAMS *pDispParams, VARIANT *pVarResult,
EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
- struct foldercollection *This = impl_from_IFolderCollection(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IFolderCollection_tid, &typeinfo);
@@ -1897,22 +1898,25 @@ static HRESULT WINAPI filecoll_QueryInterface(IFileCollection *iface, REFIID rii
static ULONG WINAPI filecoll_AddRef(IFileCollection *iface)
{
- struct filecollection *This = impl_from_IFileCollection(iface);
- ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ struct filecollection *collection = impl_from_IFileCollection(iface);
+ ULONG ref = InterlockedIncrement(&collection->ref);
+
+ TRACE("%p, refcount %ld.\n", iface, ref);
+
return ref;
}
static ULONG WINAPI filecoll_Release(IFileCollection *iface)
{
- struct filecollection *This = impl_from_IFileCollection(iface);
- ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ struct filecollection *collection = impl_from_IFileCollection(iface);
+ ULONG ref = InterlockedDecrement(&collection->ref);
+
+ TRACE("%p, refcount %ld.\n", iface, ref);
if (!ref)
{
- SysFreeString(This->path);
- free(This);
+ SysFreeString(collection->path);
+ free(collection);
}
return ref;
@@ -1929,8 +1933,8 @@ static HRESULT WINAPI filecoll_GetTypeInfoCount(IFileCollection *iface, UINT *pc
static HRESULT WINAPI filecoll_GetTypeInfo(IFileCollection *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
- struct filecollection *This = impl_from_IFileCollection(iface);
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
+
return get_typeinfo(IFileCollection_tid, ppTInfo);
}
@@ -1938,11 +1942,10 @@ static HRESULT WINAPI filecoll_GetIDsOfNames(IFileCollection *iface, REFIID riid
LPOLESTR *rgszNames, UINT cNames,
LCID lcid, DISPID *rgDispId)
{
- struct filecollection *This = impl_from_IFileCollection(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
hr = get_typeinfo(IFileCollection_tid, &typeinfo);
if(SUCCEEDED(hr))
@@ -1959,11 +1962,10 @@ static HRESULT WINAPI filecoll_Invoke(IFileCollection *iface, DISPID dispIdMembe
DISPPARAMS *pDispParams, VARIANT *pVarResult,
EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
- struct filecollection *This = impl_from_IFileCollection(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IFileCollection_tid, &typeinfo);
@@ -2089,20 +2091,23 @@ static HRESULT WINAPI drivecoll_QueryInterface(IDriveCollection *iface, REFIID r
static ULONG WINAPI drivecoll_AddRef(IDriveCollection *iface)
{
- struct drivecollection *This = impl_from_IDriveCollection(iface);
- ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ struct drivecollection *collection = impl_from_IDriveCollection(iface);
+ ULONG ref = InterlockedIncrement(&collection->ref);
+
+ TRACE("%p, refcount %ld.\n", iface, ref);
+
return ref;
}
static ULONG WINAPI drivecoll_Release(IDriveCollection *iface)
{
- struct drivecollection *This = impl_from_IDriveCollection(iface);
- ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ struct drivecollection *collection = impl_from_IDriveCollection(iface);
+ ULONG ref = InterlockedDecrement(&collection->ref);
+
+ TRACE("%p, refcount %ld.\n", iface, ref);
if (!ref)
- free(This);
+ free(collection);
return ref;
}
@@ -2118,8 +2123,8 @@ static HRESULT WINAPI drivecoll_GetTypeInfoCount(IDriveCollection *iface, UINT *
static HRESULT WINAPI drivecoll_GetTypeInfo(IDriveCollection *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
- struct drivecollection *This = impl_from_IDriveCollection(iface);
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
+
return get_typeinfo(IDriveCollection_tid, ppTInfo);
}
@@ -2127,11 +2132,10 @@ static HRESULT WINAPI drivecoll_GetIDsOfNames(IDriveCollection *iface, REFIID ri
LPOLESTR *rgszNames, UINT cNames,
LCID lcid, DISPID *rgDispId)
{
- struct drivecollection *This = impl_from_IDriveCollection(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
hr = get_typeinfo(IDriveCollection_tid, &typeinfo);
if(SUCCEEDED(hr))
@@ -2148,11 +2152,10 @@ static HRESULT WINAPI drivecoll_Invoke(IDriveCollection *iface, DISPID dispIdMem
DISPPARAMS *pDispParams, VARIANT *pVarResult,
EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
- struct drivecollection *This = impl_from_IDriveCollection(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IDriveCollection_tid, &typeinfo);
@@ -2259,22 +2262,25 @@ static HRESULT WINAPI folder_QueryInterface(IFolder *iface, REFIID riid, void **
static ULONG WINAPI folder_AddRef(IFolder *iface)
{
- struct folder *This = impl_from_IFolder(iface);
- ULONG ref = InterlockedIncrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ struct folder *folder = impl_from_IFolder(iface);
+ ULONG ref = InterlockedIncrement(&folder->ref);
+
+ TRACE("%p, refcount %ld.\n", iface, ref);
+
return ref;
}
static ULONG WINAPI folder_Release(IFolder *iface)
{
- struct folder *This = impl_from_IFolder(iface);
- ULONG ref = InterlockedDecrement(&This->ref);
- TRACE("(%p)->(%d)\n", This, ref);
+ struct folder *folder = impl_from_IFolder(iface);
+ ULONG ref = InterlockedDecrement(&folder->ref);
+
+ TRACE("%p, refcount %ld.\n", iface, ref);
if (!ref)
{
- SysFreeString(This->path);
- free(This);
+ SysFreeString(folder->path);
+ free(folder);
}
return ref;
@@ -2291,8 +2297,8 @@ static HRESULT WINAPI folder_GetTypeInfoCount(IFolder *iface, UINT *pctinfo)
static HRESULT WINAPI folder_GetTypeInfo(IFolder *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
- struct folder *This = impl_from_IFolder(iface);
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
+
return get_typeinfo(IFolder_tid, ppTInfo);
}
@@ -2300,11 +2306,10 @@ static HRESULT WINAPI folder_GetIDsOfNames(IFolder *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames,
LCID lcid, DISPID *rgDispId)
{
- struct folder *This = impl_from_IFolder(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
hr = get_typeinfo(IFolder_tid, &typeinfo);
if(SUCCEEDED(hr))
@@ -2321,11 +2326,10 @@ static HRESULT WINAPI folder_Invoke(IFolder *iface, DISPID dispIdMember,
DISPPARAMS *pDispParams, VARIANT *pVarResult,
EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
- struct folder *This = impl_from_IFolder(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IFolder_tid, &typeinfo);
@@ -2617,10 +2621,10 @@ static HRESULT WINAPI file_QueryInterface(IFile *iface, REFIID riid, void **obj)
static ULONG WINAPI file_AddRef(IFile *iface)
{
- struct file *This = impl_from_IFile(iface);
- LONG ref = InterlockedIncrement(&This->ref);
+ struct file *file = impl_from_IFile(iface);
+ LONG ref = InterlockedIncrement(&file->ref);
- TRACE("(%p) ref=%d\n", This, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
return ref;
}
@@ -2630,7 +2634,7 @@ static ULONG WINAPI file_Release(IFile *iface)
struct file *file = impl_from_IFile(iface);
LONG ref = InterlockedDecrement(&file->ref);
- TRACE("%p, refcount %d.\n", iface, ref);
+ TRACE("%p, refcount %ld.\n", iface, ref);
if (!ref)
{
@@ -2654,9 +2658,7 @@ static HRESULT WINAPI file_GetTypeInfoCount(IFile *iface, UINT *pctinfo)
static HRESULT WINAPI file_GetTypeInfo(IFile *iface,
UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
{
- struct file *This = impl_from_IFile(iface);
-
- TRACE("(%p)->(%u %u %p)\n", This, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
return get_typeinfo(IFile_tid, ppTInfo);
}
@@ -2664,11 +2666,10 @@ static HRESULT WINAPI file_GetTypeInfo(IFile *iface,
static HRESULT WINAPI file_GetIDsOfNames(IFile *iface, REFIID riid,
LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
{
- struct file *This = impl_from_IFile(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", This, debugstr_guid(riid),
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid),
rgszNames, cNames, lcid, rgDispId);
hr = get_typeinfo(IFile_tid, &typeinfo);
@@ -2679,13 +2680,13 @@ static HRESULT WINAPI file_GetIDsOfNames(IFile *iface, REFIID riid,
return hr;
}
-static HRESULT WINAPI file_Invoke(IFile *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
+static HRESULT WINAPI file_Invoke(IFile *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags,
+ DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
{
- struct file *This = impl_from_IFile(iface);
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IFile_tid, &typeinfo);
@@ -3046,7 +3047,8 @@ static HRESULT WINAPI filesys_GetTypeInfoCount(IFileSystem3 *iface, UINT *pctinf
static HRESULT WINAPI filesys_GetTypeInfo(IFileSystem3 *iface, UINT iTInfo,
LCID lcid, ITypeInfo **ppTInfo)
{
- TRACE("(%p)->(%u %u %p)\n", iface, iTInfo, lcid, ppTInfo);
+ TRACE("%p, %u, %lx, %p.\n", iface, iTInfo, lcid, ppTInfo);
+
return get_typeinfo(IFileSystem3_tid, ppTInfo);
}
@@ -3057,7 +3059,7 @@ static HRESULT WINAPI filesys_GetIDsOfNames(IFileSystem3 *iface, REFIID riid,
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%s %p %u %u %p)\n", iface, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
+ TRACE("%p, %s, %p, %u, %lx, %p.\n", iface, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId);
hr = get_typeinfo(IFileSystem3_tid, &typeinfo);
if(SUCCEEDED(hr))
@@ -3077,7 +3079,7 @@ static HRESULT WINAPI filesys_Invoke(IFileSystem3 *iface, DISPID dispIdMember,
ITypeInfo *typeinfo;
HRESULT hr;
- TRACE("(%p)->(%d %s %d %d %p %p %p %p)\n", iface, dispIdMember, debugstr_guid(riid),
+ TRACE("%p, %ld, %s, %lx, %d, %p, %p, %p, %p.\n", iface, dispIdMember, debugstr_guid(riid),
lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
hr = get_typeinfo(IFileSystem3_tid, &typeinfo);
@@ -3939,7 +3941,7 @@ static HRESULT WINAPI filesys_GetFileVersion(IFileSystem3 *iface, BSTR name, BST
return HRESULT_FROM_WIN32(GetLastError());
}
- ret = VerQueryValueW(ptr, L"\\", (void **)&info, &len);
+ ret = VerQueryValueW(ptr, L"\\", (void **)&info, NULL);
if (!ret)
{
free(ptr);
diff --git a/dlls/scrrun/scrrun.c b/dlls/scrrun/scrrun.c
index 7f39d0e642a..117256d666b 100644
--- a/dlls/scrrun/scrrun.c
+++ b/dlls/scrrun/scrrun.c
@@ -126,7 +126,7 @@ static HRESULT load_typelib(void)
hres = LoadRegTypeLib(&LIBID_Scripting, 1, 0, LOCALE_SYSTEM_DEFAULT, &tl);
if(FAILED(hres)) {
- ERR("LoadRegTypeLib failed: %08x\n", hres);
+ ERR("LoadRegTypeLib failed: %#lx.\n", hres);
return hres;
}
@@ -157,7 +157,7 @@ HRESULT get_typeinfo(tid_t tid, ITypeInfo **typeinfo)
hres = ITypeLib_GetTypeInfoOfGuid(typelib, tid_ids[tid], &ti);
if(FAILED(hres)) {
- ERR("GetTypeInfoOfGuid(%s) failed: %08x\n", debugstr_guid(tid_ids[tid]), hres);
+ ERR("GetTypeInfoOfGuid(%s) failed: %#lx.\n", debugstr_guid(tid_ids[tid]), hres);
return hres;
}
@@ -236,7 +236,7 @@ void init_classinfo(const GUID *guid, IUnknown *outer, struct provideclassinfo *
BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
{
- TRACE("%p, %u, %p\n", hinst, reason, reserved);
+ TRACE("%p, %lu, %p\n", hinst, reason, reserved);
switch (reason)
{
--
2.34.1
1
0
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/wbemdisp/locator.c | 62 +++++++++++++++++++----------------------
dlls/wbemdisp/main.c | 1 -
2 files changed, 29 insertions(+), 34 deletions(-)
diff --git a/dlls/wbemdisp/locator.c b/dlls/wbemdisp/locator.c
index 3e2566d5220..ffd6debec4d 100644
--- a/dlls/wbemdisp/locator.c
+++ b/dlls/wbemdisp/locator.c
@@ -29,7 +29,6 @@
#include "wbemdisp.h"
#include "wine/debug.h"
-#include "wine/heap.h"
#include "wbemdisp_private.h"
#include "wbemdisp_classes.h"
@@ -55,7 +54,7 @@ static WCHAR *heap_strdupW( const WCHAR *src )
{
WCHAR *dst;
if (!src) return NULL;
- if ((dst = heap_alloc( (lstrlenW( src ) + 1) * sizeof(WCHAR) ))) lstrcpyW( dst, src );
+ if ((dst = malloc( (lstrlenW( src ) + 1) * sizeof(WCHAR) ))) lstrcpyW( dst, src );
return dst;
}
@@ -162,7 +161,7 @@ static ULONG WINAPI property_Release( ISWbemProperty *iface )
TRACE( "destroying %p\n", property );
IWbemClassObject_Release( property->object );
SysFreeString( property->name );
- heap_free( property );
+ free( property );
}
return refs;
}
@@ -322,7 +321,7 @@ static HRESULT SWbemProperty_create( IWbemClassObject *wbem_object, BSTR name, I
TRACE( "%p, %p\n", obj, wbem_object );
- if (!(property = heap_alloc( sizeof(*property) ))) return E_OUTOFMEMORY;
+ if (!(property = malloc( sizeof(*property) ))) return E_OUTOFMEMORY;
property->ISWbemProperty_iface.lpVtbl = &property_vtbl;
property->refs = 1;
property->object = wbem_object;
@@ -360,7 +359,7 @@ static ULONG WINAPI propertyset_Release( ISWbemPropertySet *iface )
{
TRACE( "destroying %p\n", propertyset );
IWbemClassObject_Release( propertyset->object );
- heap_free( propertyset );
+ free( propertyset );
}
return refs;
}
@@ -520,7 +519,7 @@ static HRESULT SWbemPropertySet_create( IWbemClassObject *wbem_object, ISWbemPro
TRACE( "%p, %p\n", obj, wbem_object );
- if (!(propertyset = heap_alloc( sizeof(*propertyset) ))) return E_OUTOFMEMORY;
+ if (!(propertyset = malloc( sizeof(*propertyset) ))) return E_OUTOFMEMORY;
propertyset->ISWbemPropertySet_iface.lpVtbl = &propertyset_vtbl;
propertyset->refs = 1;
propertyset->object = wbem_object;
@@ -613,8 +612,8 @@ static ULONG WINAPI method_Release( ISWbemMethod *iface )
{
TRACE( "destroying %p\n", method );
ISWbemMethodSet_Release( &method->set->ISWbemMethodSet_iface );
- heap_free( method->name );
- heap_free( method );
+ free( method->name );
+ free( method );
}
return refs;
}
@@ -779,8 +778,7 @@ static HRESULT SWbemMethod_create( struct methodset *set, const WCHAR *name, ISW
{
struct method *method;
- if (!(method = heap_alloc(sizeof(*method))))
- return E_OUTOFMEMORY;
+ if (!(method = malloc( sizeof(*method) ))) return E_OUTOFMEMORY;
method->ISWbemMethod_iface.lpVtbl = &methodvtbl;
method->refs = 1;
@@ -837,7 +835,7 @@ static ULONG WINAPI methodset_Release( ISWbemMethodSet *iface )
{
TRACE( "destroying %p\n", set );
ISWbemObject_Release( &set->object->ISWbemObject_iface );
- heap_free( set );
+ free( set );
}
return refs;
}
@@ -982,8 +980,7 @@ static HRESULT SWbemMethodSet_create( struct object *object, ISWbemMethodSet **o
{
struct methodset *set;
- if (!(set = heap_alloc(sizeof(*set))))
- return E_OUTOFMEMORY;
+ if (!(set = malloc( sizeof(*set) ))) return E_OUTOFMEMORY;
set->ISWbemMethodSet_iface.lpVtbl = &methodsetvtbl;
set->refs = 1;
@@ -1024,8 +1021,8 @@ static ULONG WINAPI object_Release(
IWbemClassObject_Release( object->object );
ISWbemServices_Release( &object->services->ISWbemServices_iface );
for (i = 0; i < object->nb_members; i++) SysFreeString( object->members[i].name );
- heap_free( object->members );
- heap_free( object );
+ free( object->members );
+ free( object );
}
return refs;
}
@@ -1094,7 +1091,7 @@ static BOOL object_reserve_member( struct object *object, unsigned int count, un
if (new_capacity < count)
new_capacity = max_capacity;
- if (!(new_members = heap_realloc( object->members, new_capacity * sizeof(*new_members) )))
+ if (!(new_members = realloc( object->members, new_capacity * sizeof(*new_members) )))
return FALSE;
object->members = new_members;
@@ -1153,7 +1150,7 @@ static HRESULT init_members( struct object *object )
error:
for (i = 0; i < count; ++i)
SysFreeString( object->members[i].name );
- heap_free( object->members );
+ free( object->members );
object->members = NULL;
object->nb_members = 0;
return E_FAIL;
@@ -1677,7 +1674,7 @@ static HRESULT SWbemObject_create( struct services *services, IWbemClassObject *
TRACE( "%p, %p\n", obj, wbem_object );
- if (!(object = heap_alloc( sizeof(*object) ))) return E_OUTOFMEMORY;
+ if (!(object = malloc( sizeof(*object) ))) return E_OUTOFMEMORY;
object->ISWbemObject_iface.lpVtbl = &object_vtbl;
object->refs = 1;
object->object = wbem_object;
@@ -1726,7 +1723,7 @@ static ULONG WINAPI objectset_Release(
TRACE( "destroying %p\n", objectset );
IEnumWbemClassObject_Release( objectset->objectenum );
ISWbemServices_Release( &objectset->services->ISWbemServices_iface );
- heap_free( objectset );
+ free( objectset );
}
return refs;
}
@@ -1949,7 +1946,7 @@ static HRESULT SWbemObjectSet_create( struct services *services, IEnumWbemClassO
TRACE( "%p, %p\n", obj, wbem_objectenum );
- if (!(objectset = heap_alloc( sizeof(*objectset) ))) return E_OUTOFMEMORY;
+ if (!(objectset = malloc( sizeof(*objectset) ))) return E_OUTOFMEMORY;
objectset->ISWbemObjectSet_iface.lpVtbl = &objectset_vtbl;
objectset->refs = 1;
objectset->objectenum = wbem_objectenum;
@@ -1994,7 +1991,7 @@ static ULONG WINAPI enumvar_Release(
TRACE( "destroying %p\n", enumvar );
IEnumWbemClassObject_Release( enumvar->objectenum );
ISWbemServices_Release( &enumvar->services->ISWbemServices_iface );
- heap_free( enumvar );
+ free( enumvar );
}
return refs;
}
@@ -2087,7 +2084,7 @@ static HRESULT EnumVARIANT_create( struct services *services, IEnumWbemClassObje
{
struct enumvar *enumvar;
- if (!(enumvar = heap_alloc( sizeof(*enumvar) ))) return E_OUTOFMEMORY;
+ if (!(enumvar = malloc( sizeof(*enumvar) ))) return E_OUTOFMEMORY;
enumvar->IEnumVARIANT_iface.lpVtbl = &enumvar_vtbl;
enumvar->refs = 1;
enumvar->objectenum = objectenum;
@@ -2122,7 +2119,7 @@ static ULONG WINAPI services_Release(
{
TRACE( "destroying %p\n", services );
IWbemServices_Release( services->services );
- heap_free( services );
+ free( services );
}
return refs;
}
@@ -2587,7 +2584,7 @@ static HRESULT SWbemServices_create( IWbemServices *wbem_services, ISWbemService
TRACE( "%p, %p\n", obj, wbem_services );
- if (!(services = heap_alloc( sizeof(*services) ))) return E_OUTOFMEMORY;
+ if (!(services = malloc( sizeof(*services) ))) return E_OUTOFMEMORY;
services->ISWbemServices_iface.lpVtbl = &services_vtbl;
services->refs = 1;
services->services = wbem_services;
@@ -2627,7 +2624,7 @@ static ULONG WINAPI locator_Release(
TRACE( "destroying %p\n", locator );
if (locator->locator)
IWbemLocator_Release( locator->locator );
- heap_free( locator );
+ free( locator );
}
return refs;
}
@@ -2829,7 +2826,7 @@ HRESULT SWbemLocator_create( void **obj )
TRACE( "%p\n", obj );
- if (!(locator = heap_alloc( sizeof(*locator) ))) return E_OUTOFMEMORY;
+ if (!(locator = malloc( sizeof(*locator) ))) return E_OUTOFMEMORY;
locator->ISWbemLocator_iface.lpVtbl = &locator_vtbl;
locator->refs = 1;
locator->locator = NULL;
@@ -2867,7 +2864,7 @@ static ULONG WINAPI security_Release(
if (!refs)
{
TRACE( "destroying %p\n", security );
- heap_free( security );
+ free( security );
}
return refs;
}
@@ -3056,7 +3053,7 @@ static HRESULT ISWbemSecurity_create( ISWbemSecurity **obj )
TRACE( "%p\n", obj );
- if (!(security = heap_alloc( sizeof(*security) ))) return E_OUTOFMEMORY;
+ if (!(security = malloc( sizeof(*security) ))) return E_OUTOFMEMORY;
security->ISWbemSecurity_iface.lpVtbl = &security_vtbl;
security->refs = 1;
security->implevel = wbemImpersonationLevelImpersonate;
@@ -3122,7 +3119,7 @@ static ULONG WINAPI namedvalue_Release(
if (!refs)
{
TRACE( "destroying %p\n", value );
- heap_free( value );
+ free( value );
}
return refs;
}
@@ -3249,8 +3246,7 @@ static HRESULT namedvalue_create( ISWbemNamedValue **value )
{
struct namedvalue *object;
- if (!(object = heap_alloc(sizeof(*object))))
- return E_OUTOFMEMORY;
+ if (!(object = malloc( sizeof(*object) ))) return E_OUTOFMEMORY;
object->ISWbemNamedValue_iface.lpVtbl = &namedvaluevtbl;
object->refs = 1;
@@ -3301,7 +3297,7 @@ static ULONG WINAPI namedvalueset_Release(
TRACE( "destroying %p\n", set );
if (set->context)
IWbemContext_Release( set->context );
- heap_free( set );
+ free( set );
}
return refs;
}
@@ -3513,7 +3509,7 @@ HRESULT SWbemNamedValueSet_create( void **obj )
TRACE( "%p\n", obj );
- if (!(set = heap_alloc_zero( sizeof(*set) ))) return E_OUTOFMEMORY;
+ if (!(set = calloc( 1, sizeof(*set) ))) return E_OUTOFMEMORY;
set->ISWbemNamedValueSet_iface.lpVtbl = &namedvalueset_vtbl;
set->refs = 1;
diff --git a/dlls/wbemdisp/main.c b/dlls/wbemdisp/main.c
index 0ceb417ad52..b71efdb6da0 100644
--- a/dlls/wbemdisp/main.c
+++ b/dlls/wbemdisp/main.c
@@ -28,7 +28,6 @@
#include "rpcproxy.h"
#include "wine/debug.h"
-#include "wine/heap.h"
#include "wbemdisp_private.h"
#include "wbemdisp_classes.h"
--
2.30.2
1
0
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/wbemprox/builtin.c | 284 +++++++++++++++----------------
dlls/wbemprox/class.c | 52 +++---
dlls/wbemprox/qualifier.c | 22 +--
dlls/wbemprox/query.c | 50 +++---
dlls/wbemprox/reg.c | 20 +--
dlls/wbemprox/services.c | 70 ++++----
dlls/wbemprox/table.c | 16 +-
dlls/wbemprox/tests/query.c | 5 +-
dlls/wbemprox/wbemlocator.c | 21 ++-
dlls/wbemprox/wbemprox_private.h | 5 +-
dlls/wbemprox/wql.y | 2 +-
11 files changed, 270 insertions(+), 277 deletions(-)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index 5a09d64b8fb..c71bab80ee2 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -1055,7 +1055,7 @@ static BOOL resize_table( struct table *table, UINT row_count, UINT row_size )
{
if (!table->num_rows_allocated)
{
- if (!(table->data = heap_alloc( row_count * row_size ))) return FALSE;
+ if (!(table->data = malloc( row_count * row_size ))) return FALSE;
table->num_rows_allocated = row_count;
return TRUE;
}
@@ -1063,7 +1063,7 @@ static BOOL resize_table( struct table *table, UINT row_count, UINT row_size )
{
BYTE *data;
UINT count = max( row_count, table->num_rows_allocated * 2 );
- if (!(data = heap_realloc( table->data, count * row_size ))) return FALSE;
+ if (!(data = realloc( table->data, count * row_size ))) return FALSE;
table->data = data;
table->num_rows_allocated = count;
}
@@ -1250,7 +1250,7 @@ static enum fill_status fill_baseboard( struct table *table, const struct expr *
if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
len = GetSystemFirmwareTable( RSMB, 0, NULL, 0 );
- if (!(buf = heap_alloc( len ))) return FILL_STATUS_FAILED;
+ if (!(buf = malloc( len ))) return FILL_STATUS_FAILED;
GetSystemFirmwareTable( RSMB, 0, buf, len );
rec = (struct record_baseboard *)table->data;
@@ -1264,7 +1264,7 @@ static enum fill_status fill_baseboard( struct table *table, const struct expr *
if (!match_row( table, row, cond, &status )) free_row_values( table, row );
else row++;
- heap_free( buf );
+ free( buf );
TRACE("created %u rows\n", row);
table->num_rows = row;
@@ -1331,7 +1331,7 @@ static WCHAR *convert_bios_date( const WCHAR *str )
else if (q - p == 2) year = 1900 + (p[0] - '0') * 10 + p[1] - '0';
else return NULL;
- if (!(ret = heap_alloc( sizeof(fmtW) ))) return NULL;
+ if (!(ret = malloc( sizeof(fmtW) ))) return NULL;
swprintf( ret, ARRAY_SIZE(fmtW), fmtW, year, month, day );
return ret;
}
@@ -1340,7 +1340,7 @@ static WCHAR *get_bios_releasedate( const char *buf, UINT len )
{
WCHAR *ret, *date = get_bios_string( 3, buf, len );
if (!date || !(ret = convert_bios_date( date ))) ret = heap_strdupW( L"20120608000000.000000+000" );
- heap_free( date );
+ free( date );
return ret;
}
@@ -1409,7 +1409,7 @@ static enum fill_status fill_bios( struct table *table, const struct expr *cond
if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
len = GetSystemFirmwareTable( RSMB, 0, NULL, 0 );
- if (!(buf = heap_alloc( len ))) return FILL_STATUS_FAILED;
+ if (!(buf = malloc( len ))) return FILL_STATUS_FAILED;
GetSystemFirmwareTable( RSMB, 0, buf, len );
rec = (struct record_bios *)table->data;
@@ -1431,7 +1431,7 @@ static enum fill_status fill_bios( struct table *table, const struct expr *cond
if (!match_row( table, row, cond, &status )) free_row_values( table, row );
else row++;
- heap_free( buf );
+ free( buf );
TRACE("created %u rows\n", row);
table->num_rows = row;
@@ -1500,11 +1500,11 @@ static UINT get_logical_processor_count( UINT *num_physical, UINT *num_packages
status = NtQuerySystemInformationEx( SystemLogicalProcessorInformationEx, &all, sizeof(all), NULL, 0, &len );
if (status != STATUS_INFO_LENGTH_MISMATCH) return get_processor_count();
- if (!(buf = heap_alloc( len ))) return get_processor_count();
+ if (!(buf = malloc( len ))) return get_processor_count();
status = NtQuerySystemInformationEx( SystemLogicalProcessorInformationEx, &all, sizeof(all), buf, len, NULL );
if (status != STATUS_SUCCESS)
{
- heap_free( buf );
+ free( buf );
return get_processor_count();
}
@@ -1524,7 +1524,7 @@ static UINT get_logical_processor_count( UINT *num_physical, UINT *num_packages
offset += entry->Size;
}
- heap_free( buf );
+ free( buf );
if (num_physical) *num_physical = core_relation_count;
if (num_packages) *num_packages = package_relation_count;
return smt_enabled ? core_relation_count * 2 : core_relation_count;
@@ -1553,7 +1553,7 @@ static WCHAR *get_computername(void)
WCHAR *ret;
DWORD size = MAX_COMPUTERNAME_LENGTH + 1;
- if (!(ret = heap_alloc( size * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( size * sizeof(WCHAR) ))) return NULL;
GetComputerNameW( ret, &size );
return ret;
}
@@ -1569,7 +1569,7 @@ static WCHAR *get_username(void)
usersize = 0;
GetUserNameW( NULL, &usersize );
size = compsize + usersize; /* two null terminators account for the \ */
- if (!(ret = heap_alloc( size * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( size * sizeof(WCHAR) ))) return NULL;
GetComputerNameW( ret, &compsize );
ret[compsize] = '\\';
GetUserNameW( ret + compsize + 1, &usersize );
@@ -1639,7 +1639,7 @@ static WCHAR *get_compsysproduct_uuid( const char *buf, UINT len )
if (!(hdr = find_smbios_entry( SMBIOS_TYPE_SYSTEM, buf, len )) || hdr->length < sizeof(*system)) goto done;
system = (const struct smbios_system *)hdr;
- if (!memcmp( system->uuid, none, sizeof(none) ) || !(ret = heap_alloc( 37 * sizeof(WCHAR) ))) goto done;
+ if (!memcmp( system->uuid, none, sizeof(none) ) || !(ret = malloc( 37 * sizeof(WCHAR) ))) goto done;
ptr = system->uuid;
swprintf( ret, 37, L"%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X", ptr[0], ptr[1],
@@ -1674,7 +1674,7 @@ static enum fill_status fill_compsysproduct( struct table *table, const struct e
if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
len = GetSystemFirmwareTable( RSMB, 0, NULL, 0 );
- if (!(buf = heap_alloc( len ))) return FILL_STATUS_FAILED;
+ if (!(buf = malloc( len ))) return FILL_STATUS_FAILED;
GetSystemFirmwareTable( RSMB, 0, buf, len );
rec = (struct record_computersystemproduct *)table->data;
@@ -1687,7 +1687,7 @@ static enum fill_status fill_compsysproduct( struct table *table, const struct e
if (!match_row( table, row, cond, &status )) free_row_values( table, row );
else row++;
- heap_free( buf );
+ free( buf );
TRACE("created %u rows\n", row);
table->num_rows = row;
@@ -1706,16 +1706,16 @@ static struct dirstack *alloc_dirstack( UINT size )
{
struct dirstack *dirstack;
- if (!(dirstack = heap_alloc( sizeof(*dirstack) ))) return NULL;
- if (!(dirstack->dirs = heap_alloc( sizeof(WCHAR *) * size )))
+ if (!(dirstack = malloc( sizeof(*dirstack) ))) return NULL;
+ if (!(dirstack->dirs = malloc( sizeof(WCHAR *) * size )))
{
- heap_free( dirstack );
+ free( dirstack );
return NULL;
}
- if (!(dirstack->len_dirs = heap_alloc( sizeof(UINT) * size )))
+ if (!(dirstack->len_dirs = malloc( sizeof(UINT) * size )))
{
- heap_free( dirstack->dirs );
- heap_free( dirstack );
+ free( dirstack->dirs );
+ free( dirstack );
return NULL;
}
dirstack->num_dirs = 0;
@@ -1726,16 +1726,16 @@ static struct dirstack *alloc_dirstack( UINT size )
static void clear_dirstack( struct dirstack *dirstack )
{
UINT i;
- for (i = 0; i < dirstack->num_dirs; i++) heap_free( dirstack->dirs[i] );
+ for (i = 0; i < dirstack->num_dirs; i++) free( dirstack->dirs[i] );
dirstack->num_dirs = 0;
}
static void free_dirstack( struct dirstack *dirstack )
{
clear_dirstack( dirstack );
- heap_free( dirstack->dirs );
- heap_free( dirstack->len_dirs );
- heap_free( dirstack );
+ free( dirstack->dirs );
+ free( dirstack->len_dirs );
+ free( dirstack );
}
static BOOL push_dir( struct dirstack *dirstack, WCHAR *dir, UINT len )
@@ -1750,9 +1750,9 @@ static BOOL push_dir( struct dirstack *dirstack, WCHAR *dir, UINT len )
UINT *len_tmp;
size = dirstack->num_allocated * 2;
- if (!(tmp = heap_realloc( dirstack->dirs, size * sizeof(WCHAR *) ))) return FALSE;
+ if (!(tmp = realloc( dirstack->dirs, size * sizeof(WCHAR *) ))) return FALSE;
dirstack->dirs = tmp;
- if (!(len_tmp = heap_realloc( dirstack->len_dirs, size * sizeof(UINT) ))) return FALSE;
+ if (!(len_tmp = realloc( dirstack->len_dirs, size * sizeof(UINT) ))) return FALSE;
dirstack->len_dirs = len_tmp;
dirstack->num_allocated = size;
}
@@ -1785,7 +1785,7 @@ static WCHAR *build_glob( WCHAR drive, const WCHAR *path, UINT len )
UINT i = 0;
WCHAR *ret;
- if (!(ret = heap_alloc( (len + 6) * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( (len + 6) * sizeof(WCHAR) ))) return NULL;
ret[i++] = drive;
ret[i++] = ':';
ret[i++] = '\\';
@@ -1811,7 +1811,7 @@ static WCHAR *build_name( WCHAR drive, const WCHAR *path )
if (*p == '\\') len += 2;
else len++;
};
- if (!(ret = heap_alloc( (len + 5) * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( (len + 5) * sizeof(WCHAR) ))) return NULL;
ret[i++] = drive;
ret[i++] = ':';
ret[i++] = '\\';
@@ -1844,7 +1844,7 @@ static WCHAR *build_dirname( const WCHAR *path, UINT *ret_len )
while (p >= start && *p != '\\') { len--; p--; };
while (p >= start && *p == '\\') { len--; p--; };
- if (!(ret = heap_alloc( (len + 1) * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( (len + 1) * sizeof(WCHAR) ))) return NULL;
for (i = 0, p = start; p < start + len; p++)
{
if (p[0] == '\\' && p[1] == '\\')
@@ -1897,11 +1897,11 @@ static UINT seed_dirs( struct dirstack *dirstack, const struct expr *cond, WCHAR
{
if (seen_dir( dirstack, path ))
{
- heap_free( path );
+ free( path );
return ++*count;
}
else if (push_dir( dirstack, path, len )) return ++*count;
- heap_free( path );
+ free( path );
return *count = 0;
}
}
@@ -1923,7 +1923,7 @@ static WCHAR *append_path( const WCHAR *path, const WCHAR *segment, UINT *len )
*len = 0;
if (path) len_path = lstrlenW( path );
- if (!(ret = heap_alloc( (len_path + len_segment + 2) * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( (len_path + len_segment + 2) * sizeof(WCHAR) ))) return NULL;
if (path && len_path)
{
memcpy( ret, path, len_path * sizeof(WCHAR) );
@@ -1943,22 +1943,22 @@ static WCHAR *get_file_version( const WCHAR *filename )
void *block;
WCHAR *ret;
- if (!(ret = heap_alloc( len * sizeof(WCHAR) ))) return NULL;
- if (!(size = GetFileVersionInfoSizeW( filename, NULL )) || !(block = heap_alloc( size )))
+ if (!(ret = malloc( len * sizeof(WCHAR) ))) return NULL;
+ if (!(size = GetFileVersionInfoSizeW( filename, NULL )) || !(block = malloc( size )))
{
- heap_free( ret );
+ free( ret );
return NULL;
}
if (!GetFileVersionInfoW( filename, 0, size, block ) ||
!VerQueryValueW( block, L"\\", (void **)&info, &size ))
{
- heap_free( block );
- heap_free( ret );
+ free( block );
+ free( ret );
return NULL;
}
swprintf( ret, len, L"%u.%u.%u.%u", info->dwFileVersionMS >> 16, info->dwFileVersionMS & 0xffff,
info->dwFileVersionLS >> 16, info->dwFileVersionLS & 0xffff );
- heap_free( block );
+ free( block );
return ret;
}
@@ -1989,8 +1989,8 @@ static enum fill_status fill_datafile( struct table *table, const struct expr *c
for (;;)
{
- heap_free( glob );
- heap_free( path );
+ free( glob );
+ free( path );
path = pop_dir( dirstack, &len );
if (!(glob = build_glob( root[0], path, len )))
{
@@ -2019,7 +2019,7 @@ static enum fill_status fill_datafile( struct table *table, const struct expr *c
if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
{
if (push_dir( dirstack, new_path, len )) continue;
- heap_free( new_path );
+ free( new_path );
FindClose( handle );
status = FILL_STATUS_FAILED;
goto done;
@@ -2027,7 +2027,7 @@ static enum fill_status fill_datafile( struct table *table, const struct expr *c
rec = (struct record_datafile *)(table->data + offset);
rec->name = build_name( root[0], new_path );
rec->version = get_file_version( rec->name );
- heap_free( new_path );
+ free( new_path );
if (!match_row( table, row, cond, &status ))
{
free_row_values( table, row );
@@ -2052,8 +2052,8 @@ static enum fill_status fill_datafile( struct table *table, const struct expr *c
done:
free_dirstack( dirstack );
- heap_free( glob );
- heap_free( path );
+ free( glob );
+ free( path );
TRACE("created %u rows\n", row);
table->num_rows = row;
@@ -2117,8 +2117,8 @@ static enum fill_status fill_directory( struct table *table, const struct expr *
for (;;)
{
- heap_free( glob );
- heap_free( path );
+ free( glob );
+ free( path );
path = pop_dir( dirstack, &len );
if (!(glob = build_glob( root[0], path, len )))
{
@@ -2148,7 +2148,7 @@ static enum fill_status fill_directory( struct table *table, const struct expr *
if (!(push_dir( dirstack, new_path, len )))
{
- heap_free( new_path );
+ free( new_path );
FindClose( handle );
status = FILL_STATUS_FAILED;
goto done;
@@ -2156,7 +2156,7 @@ static enum fill_status fill_directory( struct table *table, const struct expr *
rec = (struct record_directory *)(table->data + offset);
rec->accessmask = FILE_ALL_ACCESS;
rec->name = build_name( root[0], new_path );
- heap_free( new_path );
+ free( new_path );
if (!match_row( table, row, cond, &status ))
{
free_row_values( table, row );
@@ -2181,8 +2181,8 @@ static enum fill_status fill_directory( struct table *table, const struct expr *
done:
free_dirstack( dirstack );
- heap_free( glob );
- heap_free( path );
+ free( glob );
+ free( path );
TRACE("created %u rows\n", row);
table->num_rows = row;
@@ -2229,15 +2229,15 @@ static WCHAR *get_diskdrive_serialnumber( WCHAR letter )
size = sizeof(*desc) + 256;
for (;;)
{
- if (!(desc = heap_alloc( size ))) break;
+ if (!(desc = malloc( size ))) break;
if (DeviceIoControl( handle, IOCTL_STORAGE_QUERY_PROPERTY, &query, sizeof(query), desc, size, NULL, NULL ))
{
if (desc->SerialNumberOffset) ret = heap_strdupAW( (const char *)desc + desc->SerialNumberOffset );
- heap_free( desc );
+ free( desc );
break;
}
size = desc->Size;
- heap_free( desc );
+ free( desc );
if (GetLastError() != ERROR_MORE_DATA) break;
}
@@ -2308,10 +2308,10 @@ static void free_associations( struct association *assoc, UINT count )
if (!assoc) return;
for (i = 0; i < count; i++)
{
- heap_free( assoc[i].ref );
- heap_free( assoc[i].ref2 );
+ free( assoc[i].ref );
+ free( assoc[i].ref2 );
}
- heap_free( assoc );
+ free( assoc );
}
static struct association *get_diskdrivetodiskpartition_pairs( UINT *count )
@@ -2332,7 +2332,7 @@ static struct association *get_diskdrivetodiskpartition_pairs( UINT *count )
&query2->view, &query2->mem )) != S_OK) goto done;
if ((hr = execute_view( query2->view )) != S_OK) goto done;
- if (!(ret = heap_alloc_zero( query->view->result_count * sizeof(*ret) ))) goto done;
+ if (!(ret = calloc( query->view->result_count, sizeof(*ret) ))) goto done;
for (i = 0; i < query->view->result_count; i++)
{
@@ -2387,7 +2387,7 @@ static enum fill_status fill_diskdrivetodiskpartition( struct table *table, cons
row++;
}
- heap_free( assoc );
+ free( assoc );
TRACE("created %u rows\n", row);
table->num_rows = row;
@@ -2491,7 +2491,7 @@ static WCHAR *get_ip4_string( DWORD addr )
DWORD len = sizeof("ddd.ddd.ddd.ddd");
WCHAR *ret;
- if (!(ret = heap_alloc( len * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( len * sizeof(WCHAR) ))) return NULL;
swprintf( ret, len, L"%u.%u.%u.%u", (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff );
return ret;
}
@@ -2504,15 +2504,15 @@ static enum fill_status fill_ip4routetable( struct table *table, const struct ex
enum fill_status status = FILL_STATUS_UNFILTERED;
if (GetIpForwardTable( NULL, &size, TRUE ) != ERROR_INSUFFICIENT_BUFFER) return FILL_STATUS_FAILED;
- if (!(forwards = heap_alloc( size ))) return FILL_STATUS_FAILED;
+ if (!(forwards = malloc( size ))) return FILL_STATUS_FAILED;
if (GetIpForwardTable( forwards, &size, TRUE ))
{
- heap_free( forwards );
+ free( forwards );
return FILL_STATUS_FAILED;
}
if (!resize_table( table, max(forwards->dwNumEntries, 1), sizeof(*rec) ))
{
- heap_free( forwards );
+ free( forwards );
return FILL_STATUS_FAILED;
}
@@ -2535,7 +2535,7 @@ static enum fill_status fill_ip4routetable( struct table *table, const struct ex
TRACE("created %u rows\n", row);
table->num_rows = row;
- heap_free( forwards );
+ free( forwards );
return status;
}
@@ -2621,7 +2621,7 @@ static struct association *get_logicaldisktopartition_pairs( UINT *count )
&query2->mem )) != S_OK) goto done;
if ((hr = execute_view( query2->view )) != S_OK) goto done;
- if (!(ret = heap_alloc_zero( query->view->result_count * sizeof(*ret) ))) goto done;
+ if (!(ret = calloc( query->view->result_count, sizeof(*ret) ))) goto done;
/* assume fixed and removable disks are enumerated in the same order as partitions */
for (i = 0; i < query->view->result_count; i++)
@@ -2677,7 +2677,7 @@ static enum fill_status fill_logicaldisktopartition( struct table *table, const
row++;
}
- heap_free( assoc );
+ free( assoc );
TRACE("created %u rows\n", row);
table->num_rows = row;
@@ -2701,7 +2701,7 @@ static UINT16 get_connection_status( IF_OPER_STATUS status )
static WCHAR *get_mac_address( const BYTE *addr, DWORD len )
{
WCHAR *ret;
- if (len != 6 || !(ret = heap_alloc( 18 * sizeof(WCHAR) ))) return NULL;
+ if (len != 6 || !(ret = malloc( 18 * sizeof(WCHAR) ))) return NULL;
swprintf( ret, 18, L"%02x:%02x:%02x:%02x:%02x:%02x", addr[0], addr[1], addr[2], addr[3], addr[4], addr[5] );
return ret;
}
@@ -2740,7 +2740,7 @@ static const WCHAR *get_adaptertype( DWORD type, int *id, int *physical )
static WCHAR *guid_to_str( const GUID *ptr )
{
WCHAR *ret;
- if (!(ret = heap_alloc( GUID_SIZE * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( GUID_SIZE * sizeof(WCHAR) ))) return NULL;
swprintf( ret, GUID_SIZE, L"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
ptr->Data1, ptr->Data2, ptr->Data3, ptr->Data4[0], ptr->Data4[1], ptr->Data4[2],
ptr->Data4[3], ptr->Data4[4], ptr->Data4[5], ptr->Data4[6], ptr->Data4[7] );
@@ -2767,10 +2767,10 @@ static enum fill_status fill_networkadapter( struct table *table, const struct e
ret = GetAdaptersAddresses( AF_UNSPEC, 0, NULL, NULL, &size );
if (ret != ERROR_BUFFER_OVERFLOW) return FILL_STATUS_FAILED;
- if (!(buffer = heap_alloc( size ))) return FILL_STATUS_FAILED;
+ if (!(buffer = malloc( size ))) return FILL_STATUS_FAILED;
if (GetAdaptersAddresses( AF_UNSPEC, 0, NULL, buffer, &size ))
{
- heap_free( buffer );
+ free( buffer );
return FILL_STATUS_FAILED;
}
for (aa = buffer; aa; aa = aa->Next)
@@ -2779,7 +2779,7 @@ static enum fill_status fill_networkadapter( struct table *table, const struct e
}
if (!resize_table( table, count, sizeof(*rec) ))
{
- heap_free( buffer );
+ free( buffer );
return FILL_STATUS_FAILED;
}
for (aa = buffer; aa; aa = aa->Next)
@@ -2814,7 +2814,7 @@ static enum fill_status fill_networkadapter( struct table *table, const struct e
TRACE("created %u rows\n", row);
table->num_rows = row;
- heap_free( buffer );
+ free( buffer );
return status;
}
@@ -2838,10 +2838,10 @@ static struct array *get_defaultipgateway( IP_ADAPTER_GATEWAY_ADDRESS *list )
if (!list) return NULL;
for (gateway = list; gateway; gateway = gateway->Next) count++;
- if (!(ret = heap_alloc( sizeof(*ret) ))) return NULL;
- if (!(ptr = heap_alloc( sizeof(*ptr) * count )))
+ if (!(ret = malloc( sizeof(*ret) ))) return NULL;
+ if (!(ptr = malloc( sizeof(*ptr) * count )))
{
- heap_free( ret );
+ free( ret );
return NULL;
}
for (gateway = list; gateway; gateway = gateway->Next)
@@ -2850,9 +2850,9 @@ static struct array *get_defaultipgateway( IP_ADAPTER_GATEWAY_ADDRESS *list )
if (WSAAddressToStringW( gateway->Address.lpSockaddr, gateway->Address.iSockaddrLength,
NULL, buf, &buflen) || !(ptr[i++] = heap_strdupW( buf )))
{
- for (; i > 0; i--) heap_free( ptr[i - 1] );
- heap_free( ptr );
- heap_free( ret );
+ for (; i > 0; i--) free( ptr[i - 1] );
+ free( ptr );
+ free( ret );
return NULL;
}
}
@@ -2871,10 +2871,10 @@ static struct array *get_dnsserversearchorder( IP_ADAPTER_DNS_SERVER_ADDRESS *li
if (!list) return NULL;
for (server = list; server; server = server->Next) count++;
- if (!(ret = heap_alloc( sizeof(*ret) ))) return NULL;
- if (!(ptr = heap_alloc( sizeof(*ptr) * count )))
+ if (!(ret = malloc( sizeof(*ret) ))) return NULL;
+ if (!(ptr = malloc( sizeof(*ptr) * count )))
{
- heap_free( ret );
+ free( ret );
return NULL;
}
for (server = list; server; server = server->Next)
@@ -2883,9 +2883,9 @@ static struct array *get_dnsserversearchorder( IP_ADAPTER_DNS_SERVER_ADDRESS *li
if (WSAAddressToStringW( server->Address.lpSockaddr, server->Address.iSockaddrLength,
NULL, buf, &buflen) || !(ptr[i++] = heap_strdupW( buf )))
{
- for (; i > 0; i--) heap_free( ptr[i - 1] );
- heap_free( ptr );
- heap_free( ret );
+ for (; i > 0; i--) free( ptr[i - 1] );
+ free( ptr );
+ free( ret );
return NULL;
}
if ((p = wcsrchr( ptr[i - 1], ':' ))) *p = 0;
@@ -2905,10 +2905,10 @@ static struct array *get_ipaddress( IP_ADAPTER_UNICAST_ADDRESS_LH *list )
if (!list) return NULL;
for (address = list; address; address = address->Next) count++;
- if (!(ret = heap_alloc( sizeof(*ret) ))) return NULL;
- if (!(ptr = heap_alloc( sizeof(*ptr) * count )))
+ if (!(ret = malloc( sizeof(*ret) ))) return NULL;
+ if (!(ptr = malloc( sizeof(*ptr) * count )))
{
- heap_free( ret );
+ free( ret );
return NULL;
}
for (address = list; address; address = address->Next)
@@ -2917,9 +2917,9 @@ static struct array *get_ipaddress( IP_ADAPTER_UNICAST_ADDRESS_LH *list )
if (WSAAddressToStringW( address->Address.lpSockaddr, address->Address.iSockaddrLength,
NULL, buf, &buflen) || !(ptr[i++] = heap_strdupW( buf )))
{
- for (; i > 0; i--) heap_free( ptr[i - 1] );
- heap_free( ptr );
- heap_free( ret );
+ for (; i > 0; i--) free( ptr[i - 1] );
+ free( ptr );
+ free( ret );
return NULL;
}
}
@@ -2938,10 +2938,10 @@ static struct array *get_ipsubnet( IP_ADAPTER_UNICAST_ADDRESS_LH *list )
if (!list) return NULL;
for (address = list; address; address = address->Next) count++;
- if (!(ret = heap_alloc( sizeof(*ret) ))) return NULL;
- if (!(ptr = heap_alloc( sizeof(*ptr) * count )))
+ if (!(ret = malloc( sizeof(*ret) ))) return NULL;
+ if (!(ptr = malloc( sizeof(*ptr) * count )))
{
- heap_free( ret );
+ free( ret );
return NULL;
}
for (address = list; address; address = address->Next)
@@ -2968,9 +2968,9 @@ static struct array *get_ipsubnet( IP_ADAPTER_UNICAST_ADDRESS_LH *list )
}
if (!ptr[i++])
{
- for (; i > 0; i--) heap_free( ptr[i - 1] );
- heap_free( ptr );
- heap_free( ret );
+ for (; i > 0; i--) free( ptr[i - 1] );
+ free( ptr );
+ free( ret );
return NULL;
}
}
@@ -2998,10 +2998,10 @@ static enum fill_status fill_networkadapterconfig( struct table *table, const st
ret = GetAdaptersAddresses( AF_UNSPEC, GAA_FLAG_INCLUDE_ALL_GATEWAYS, NULL, NULL, &size );
if (ret != ERROR_BUFFER_OVERFLOW) return FILL_STATUS_FAILED;
- if (!(buffer = heap_alloc( size ))) return FILL_STATUS_FAILED;
+ if (!(buffer = malloc( size ))) return FILL_STATUS_FAILED;
if (GetAdaptersAddresses( AF_UNSPEC, GAA_FLAG_INCLUDE_ALL_GATEWAYS, NULL, buffer, &size ))
{
- heap_free( buffer );
+ free( buffer );
return FILL_STATUS_FAILED;
}
for (aa = buffer; aa; aa = aa->Next)
@@ -3010,7 +3010,7 @@ static enum fill_status fill_networkadapterconfig( struct table *table, const st
}
if (!resize_table( table, count, sizeof(*rec) ))
{
- heap_free( buffer );
+ free( buffer );
return FILL_STATUS_FAILED;
}
for (aa = buffer; aa; aa = aa->Next)
@@ -3042,7 +3042,7 @@ static enum fill_status fill_networkadapterconfig( struct table *table, const st
TRACE("created %u rows\n", row);
table->num_rows = row;
- heap_free( buffer );
+ free( buffer );
return status;
}
@@ -3132,15 +3132,15 @@ static enum fill_status fill_printer( struct table *table, const struct expr *co
EnumPrintersW( PRINTER_ENUM_LOCAL, NULL, 2, NULL, 0, &size, &count );
if (!count) return FILL_STATUS_UNFILTERED;
- if (!(info = heap_alloc( size ))) return FILL_STATUS_FAILED;
+ if (!(info = malloc( size ))) return FILL_STATUS_FAILED;
if (!EnumPrintersW( PRINTER_ENUM_LOCAL, NULL, 2, (BYTE *)info, size, &size, &count ))
{
- heap_free( info );
+ free( info );
return FILL_STATUS_FAILED;
}
if (!resize_table( table, count, sizeof(*rec) ))
{
- heap_free( info );
+ free( info );
return FILL_STATUS_FAILED;
}
@@ -3168,7 +3168,7 @@ static enum fill_status fill_printer( struct table *table, const struct expr *co
TRACE("created %u rows\n", num_rows);
table->num_rows = num_rows;
- heap_free( info );
+ free( info );
return status;
}
@@ -3345,11 +3345,11 @@ static UINT get_processor_currentclockspeed( UINT index )
UINT ret = 1000, size = get_processor_count() * sizeof(PROCESSOR_POWER_INFORMATION);
NTSTATUS status;
- if ((info = heap_alloc( size )))
+ if ((info = malloc( size )))
{
status = NtPowerInformation( ProcessorInformation, NULL, 0, info, size );
if (!status) ret = info[index].CurrentMhz;
- heap_free( info );
+ free( info );
}
return ret;
}
@@ -3359,11 +3359,11 @@ static UINT get_processor_maxclockspeed( UINT index )
UINT ret = 1000, size = get_processor_count() * sizeof(PROCESSOR_POWER_INFORMATION);
NTSTATUS status;
- if ((info = heap_alloc( size )))
+ if ((info = malloc( size )))
{
status = NtPowerInformation( ProcessorInformation, NULL, 0, info, size );
if (!status) ret = info[index].MaxMhz;
- heap_free( info );
+ free( info );
}
return ret;
}
@@ -3429,7 +3429,7 @@ static WCHAR *get_lastbootuptime(void)
TIME_FIELDS tf;
WCHAR *ret;
- if (!(ret = heap_alloc( 26 * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( 26 * sizeof(WCHAR) ))) return NULL;
NtQuerySystemInformation( SystemTimeOfDayInformation, &ti, sizeof(ti), NULL );
RtlTimeToTimeFields( &ti.BootTime, &tf );
@@ -3453,7 +3453,7 @@ static WCHAR *get_localdatetime(void)
Bias+= tzi.DaylightBias;
else
Bias+= tzi.StandardBias;
- if (!(ret = heap_alloc( 26 * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( 26 * sizeof(WCHAR) ))) return NULL;
GetLocalTime(&st);
swprintf( ret, 26, L"%04u%02u%02u%02u%02u%02u.%06u%+03d", st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute,
@@ -3465,7 +3465,7 @@ static WCHAR *get_systemdirectory(void)
void *redir;
WCHAR *ret;
- if (!(ret = heap_alloc( MAX_PATH * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( MAX_PATH * sizeof(WCHAR) ))) return NULL;
Wow64DisableWow64FsRedirection( &redir );
GetSystemDirectoryW( ret, MAX_PATH );
Wow64RevertWow64FsRedirection( redir );
@@ -3473,32 +3473,32 @@ static WCHAR *get_systemdirectory(void)
}
static WCHAR *get_systemdrive(void)
{
- WCHAR *ret = heap_alloc( 3 * sizeof(WCHAR) ); /* "c:" */
+ WCHAR *ret = malloc( 3 * sizeof(WCHAR) ); /* "c:" */
if (ret && GetEnvironmentVariableW( L"SystemDrive", ret, 3 )) return ret;
- heap_free( ret );
+ free( ret );
return NULL;
}
static WCHAR *get_codeset(void)
{
- WCHAR *ret = heap_alloc( 11 * sizeof(WCHAR) );
+ WCHAR *ret = malloc( 11 * sizeof(WCHAR) );
if (ret) swprintf( ret, 11, L"%u", GetACP() );
return ret;
}
static WCHAR *get_countrycode(void)
{
- WCHAR *ret = heap_alloc( 6 * sizeof(WCHAR) );
+ WCHAR *ret = malloc( 6 * sizeof(WCHAR) );
if (ret) GetLocaleInfoW( LOCALE_SYSTEM_DEFAULT, LOCALE_ICOUNTRY, ret, 6 );
return ret;
}
static WCHAR *get_locale(void)
{
- WCHAR *ret = heap_alloc( 5 * sizeof(WCHAR) );
+ WCHAR *ret = malloc( 5 * sizeof(WCHAR) );
if (ret) GetLocaleInfoW( LOCALE_SYSTEM_DEFAULT, LOCALE_ILANGUAGE, ret, 5 );
return ret;
}
static WCHAR *get_osbuildnumber( OSVERSIONINFOEXW *ver )
{
- WCHAR *ret = heap_alloc( 11 * sizeof(WCHAR) );
+ WCHAR *ret = malloc( 11 * sizeof(WCHAR) );
if (ret) swprintf( ret, 11, L"%u", ver->dwBuildNumber );
return ret;
}
@@ -3519,7 +3519,7 @@ static WCHAR *get_oscaption( OSVERSIONINFOEXW *ver )
int len = ARRAY_SIZE( windowsW ) - 1;
WCHAR *ret;
- if (!(ret = heap_alloc( len * sizeof(WCHAR) + sizeof(win2003W) ))) return NULL;
+ if (!(ret = malloc( len * sizeof(WCHAR) + sizeof(win2003W) ))) return NULL;
memcpy( ret, windowsW, sizeof(windowsW) );
if (ver->dwMajorVersion == 10 && ver->dwMinorVersion == 0) memcpy( ret + len, win10W, sizeof(win10W) );
else if (ver->dwMajorVersion == 6 && ver->dwMinorVersion == 3) memcpy( ret + len, win81W, sizeof(win81W) );
@@ -3549,7 +3549,7 @@ static WCHAR *get_osname( const WCHAR *caption )
int len = lstrlenW( caption );
WCHAR *ret;
- if (!(ret = heap_alloc( len * sizeof(WCHAR) + sizeof(partitionW) ))) return NULL;
+ if (!(ret = malloc( len * sizeof(WCHAR) + sizeof(partitionW) ))) return NULL;
memcpy( ret, caption, len * sizeof(WCHAR) );
memcpy( ret + len, partitionW, sizeof(partitionW) );
return ret;
@@ -3562,12 +3562,12 @@ static WCHAR *get_osserialnumber(void)
if (!RegOpenKeyExW( HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows NT\\CurrentVersion", 0, KEY_READ, &hkey ) &&
!RegQueryValueExW( hkey, L"ProductId", NULL, &type, NULL, &size ) && type == REG_SZ &&
- (ret = heap_alloc( size + sizeof(WCHAR) )))
+ (ret = malloc( size + sizeof(WCHAR) )))
{
size += sizeof(WCHAR);
if (RegQueryValueExW( hkey, L"ProductId", NULL, NULL, (BYTE *)ret, &size ))
{
- heap_free( ret );
+ free( ret );
ret = NULL;
}
}
@@ -3577,7 +3577,7 @@ static WCHAR *get_osserialnumber(void)
}
static WCHAR *get_osversion( OSVERSIONINFOEXW *ver )
{
- WCHAR *ret = heap_alloc( 33 * sizeof(WCHAR) );
+ WCHAR *ret = malloc( 33 * sizeof(WCHAR) );
if (ret) swprintf( ret, 33, L"%u.%u.%u", ver->dwMajorVersion, ver->dwMinorVersion, ver->dwBuildNumber );
return ret;
}
@@ -3693,9 +3693,9 @@ static QUERY_SERVICE_CONFIGW *query_service_config( SC_HANDLE manager, const WCH
if (!(service = OpenServiceW( manager, name, SERVICE_QUERY_CONFIG ))) return NULL;
QueryServiceConfigW( service, NULL, 0, &size );
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) goto done;
- if (!(config = heap_alloc( size ))) goto done;
+ if (!(config = malloc( size ))) goto done;
if (QueryServiceConfigW( service, config, size, &size )) goto done;
- heap_free( config );
+ free( config );
config = NULL;
done:
@@ -3716,7 +3716,7 @@ static enum fill_status fill_service( struct table *table, const struct expr *co
BOOL ret;
if (!(manager = OpenSCManagerW( NULL, NULL, SC_MANAGER_ENUMERATE_SERVICE ))) return FILL_STATUS_FAILED;
- if (!(services = heap_alloc( size ))) goto done;
+ if (!(services = malloc( size ))) goto done;
ret = EnumServicesStatusExW( manager, SC_ENUM_PROCESS_INFO, SERVICE_TYPE_ALL,
SERVICE_STATE_ALL, (BYTE *)services, size, &needed,
@@ -3725,7 +3725,7 @@ static enum fill_status fill_service( struct table *table, const struct expr *co
{
if (GetLastError() != ERROR_MORE_DATA) goto done;
size = needed;
- if (!(tmp = heap_realloc( services, size ))) goto done;
+ if (!(tmp = realloc( services, size ))) goto done;
services = tmp;
ret = EnumServicesStatusExW( manager, SC_ENUM_PROCESS_INFO, SERVICE_TYPE_ALL,
SERVICE_STATE_ALL, (BYTE *)services, size, &needed,
@@ -3758,7 +3758,7 @@ static enum fill_status fill_service( struct table *table, const struct expr *co
rec->resume_service = service_resume_service;
rec->start_service = service_start_service;
rec->stop_service = service_stop_service;
- heap_free( config );
+ free( config );
if (!match_row( table, row, cond, &fill_status ))
{
free_row_values( table, row );
@@ -3773,7 +3773,7 @@ static enum fill_status fill_service( struct table *table, const struct expr *co
done:
CloseServiceHandle( manager );
- heap_free( services );
+ free( services );
return fill_status;
}
@@ -3787,10 +3787,10 @@ static struct array *get_binaryrepresentation( PSID sid, UINT len )
struct array *ret;
UINT8 *ptr;
- if (!(ret = heap_alloc( sizeof(*ret) ))) return NULL;
- if (!(ptr = heap_alloc( len )))
+ if (!(ret = malloc( sizeof(*ret) ))) return NULL;
+ if (!(ptr = malloc( len )))
{
- heap_free( ret );
+ free( ret );
return NULL;
}
memcpy( ptr, sid, len );
@@ -3906,10 +3906,10 @@ static int get_systemenclosure_lockpresent( const char *buf, UINT len )
static struct array *dup_array( const struct array *src )
{
struct array *dst;
- if (!(dst = heap_alloc( sizeof(*dst) ))) return NULL;
- if (!(dst->ptr = heap_alloc( src->count * src->elem_size )))
+ if (!(dst = malloc( sizeof(*dst) ))) return NULL;
+ if (!(dst->ptr = malloc( src->count * src->elem_size )))
{
- heap_free( dst );
+ free( dst );
return NULL;
}
memcpy( dst->ptr, src->ptr, src->count * src->elem_size );
@@ -3928,10 +3928,10 @@ static struct array *get_systemenclosure_chassistypes( const char *buf, UINT len
if (!(hdr = find_smbios_entry( SMBIOS_TYPE_CHASSIS, buf, len )) || hdr->length < sizeof(*chassis)) goto done;
chassis = (const struct smbios_chassis *)hdr;
- if (!(ret = heap_alloc( sizeof(*ret) ))) goto done;
- if (!(types = heap_alloc( sizeof(*types) )))
+ if (!(ret = malloc( sizeof(*ret) ))) goto done;
+ if (!(types = malloc( sizeof(*types) )))
{
- heap_free( ret );
+ free( ret );
return NULL;
}
types[0] = chassis->type & ~0x80;
@@ -3955,7 +3955,7 @@ static enum fill_status fill_systemenclosure( struct table *table, const struct
if (!resize_table( table, 1, sizeof(*rec) )) return FILL_STATUS_FAILED;
len = GetSystemFirmwareTable( RSMB, 0, NULL, 0 );
- if (!(buf = heap_alloc( len ))) return FILL_STATUS_FAILED;
+ if (!(buf = malloc( len ))) return FILL_STATUS_FAILED;
GetSystemFirmwareTable( RSMB, 0, buf, len );
rec = (struct record_systemenclosure *)table->data;
@@ -3969,7 +3969,7 @@ static enum fill_status fill_systemenclosure( struct table *table, const struct
if (!match_row( table, row, cond, &status )) free_row_values( table, row );
else row++;
- heap_free( buf );
+ free( buf );
TRACE("created %u rows\n", row);
table->num_rows = row;
@@ -3982,7 +3982,7 @@ static WCHAR *get_videocontroller_pnpdeviceid( DXGI_ADAPTER_DESC *desc )
UINT len = sizeof(fmtW) + 2;
WCHAR *ret;
- if (!(ret = heap_alloc( len * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( len * sizeof(WCHAR) ))) return NULL;
swprintf( ret, len, fmtW, desc->VendorId, desc->DeviceId, desc->SubSysId, desc->Revision );
return ret;
}
@@ -4082,7 +4082,7 @@ static WCHAR *get_sounddevice_pnpdeviceid( DXGI_ADAPTER_DESC *desc )
UINT len = sizeof(fmtW) + 2;
WCHAR *ret;
- if (!(ret = heap_alloc( len * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( len * sizeof(WCHAR) ))) return NULL;
swprintf( ret, len, fmtW, desc->VendorId, desc->DeviceId, desc->SubSysId, desc->Revision );
return ret;
}
diff --git a/dlls/wbemprox/class.c b/dlls/wbemprox/class.c
index cabf1c9058d..6f93c58a0df 100644
--- a/dlls/wbemprox/class.c
+++ b/dlls/wbemprox/class.c
@@ -61,7 +61,7 @@ static ULONG WINAPI enum_class_object_Release(
{
TRACE("destroying %p\n", ec);
release_query( ec->query );
- heap_free( ec );
+ free( ec );
}
return refs;
}
@@ -205,8 +205,7 @@ HRESULT EnumWbemClassObject_create( struct query *query, LPVOID *ppObj )
TRACE("%p\n", ppObj);
- ec = heap_alloc( sizeof(*ec) );
- if (!ec) return E_OUTOFMEMORY;
+ if (!(ec = malloc( sizeof(*ec) ))) return E_OUTOFMEMORY;
ec->IEnumWbemClassObject_iface.lpVtbl = &enum_class_object_vtbl;
ec->refs = 1;
@@ -225,10 +224,10 @@ static struct record *create_record( struct table *table )
UINT i;
struct record *record;
- if (!(record = heap_alloc( sizeof(struct record) ))) return NULL;
- if (!(record->fields = heap_alloc( table->num_cols * sizeof(struct field) )))
+ if (!(record = malloc( sizeof(struct record) ))) return NULL;
+ if (!(record->fields = malloc( table->num_cols * sizeof(struct field) )))
{
- heap_free( record );
+ free( record );
return NULL;
}
for (i = 0; i < table->num_cols; i++)
@@ -247,10 +246,10 @@ void destroy_array( struct array *array, CIMTYPE type )
if (!array) return;
if (type == CIM_STRING || type == CIM_DATETIME || type == CIM_REFERENCE)
{
- for (i = 0; i < array->count; i++) heap_free( *(WCHAR **)((char *)array->ptr + i * array->elem_size) );
+ for (i = 0; i < array->count; i++) free( *(WCHAR **)((char *)array->ptr + i * array->elem_size) );
}
- heap_free( array->ptr );
- heap_free( array );
+ free( array->ptr );
+ free( array );
}
static void destroy_record( struct record *record )
@@ -263,12 +262,12 @@ static void destroy_record( struct record *record )
{
if (record->fields[i].type == CIM_STRING ||
record->fields[i].type == CIM_DATETIME ||
- record->fields[i].type == CIM_REFERENCE) heap_free( record->fields[i].u.sval );
+ record->fields[i].type == CIM_REFERENCE) free( record->fields[i].u.sval );
else if (record->fields[i].type & CIM_FLAG_ARRAY)
destroy_array( record->fields[i].u.aval, record->fields[i].type & CIM_TYPE_MASK );
}
- heap_free( record->fields );
- heap_free( record );
+ free( record->fields );
+ free( record );
}
struct class_object
@@ -307,8 +306,8 @@ static ULONG WINAPI class_object_Release(
TRACE("destroying %p\n", co);
if (co->iter) IEnumWbemClassObject_Release( co->iter );
destroy_record( co->record );
- heap_free( co->name );
- heap_free( co );
+ free( co->name );
+ free( co );
}
return refs;
}
@@ -774,8 +773,8 @@ static HRESULT create_signature_columns_and_data( IEnumWbemClassObject *iter, UI
int i = 0;
count = count_instances( iter );
- if (!(columns = heap_alloc( count * sizeof(struct column) ))) return E_OUTOFMEMORY;
- if (!(row = heap_alloc_zero( count * sizeof(LONGLONG) ))) goto error;
+ if (!(columns = malloc( count * sizeof(struct column) ))) return E_OUTOFMEMORY;
+ if (!(row = calloc( count, sizeof(LONGLONG) ))) goto error;
for (;;)
{
@@ -805,9 +804,9 @@ static HRESULT create_signature_columns_and_data( IEnumWbemClassObject *iter, UI
return S_OK;
error:
- for (; i >= 0; i--) heap_free( (WCHAR *)columns[i].name );
- heap_free( columns );
- heap_free( row );
+ for (; i >= 0; i--) free( (WCHAR *)columns[i].name );
+ free( columns );
+ free( row );
return hr;
}
@@ -825,7 +824,7 @@ static HRESULT create_signature_table( IEnumWbemClassObject *iter, enum wbm_name
if (!(table = create_table( name, num_cols, columns, 1, 1, row, NULL )))
{
free_columns( columns, num_cols );
- heap_free( row );
+ free( row );
return E_OUTOFMEMORY;
}
if (!add_table( ns, table )) free_table( table ); /* already exists */
@@ -837,7 +836,7 @@ static WCHAR *build_signature_table_name( const WCHAR *class, const WCHAR *metho
UINT len = ARRAY_SIZE(L"__%s_%s_%s") + ARRAY_SIZE(L"OUT") + lstrlenW( class ) + lstrlenW( method );
WCHAR *ret;
- if (!(ret = heap_alloc( len * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( len * sizeof(WCHAR) ))) return NULL;
swprintf( ret, len, L"__%s_%s_%s", class, method, dir == PARAM_IN ? L"IN" : L"OUT" );
return wcsupr( ret );
}
@@ -852,11 +851,11 @@ HRESULT create_signature( enum wbm_namespace ns, const WCHAR *class, const WCHAR
HRESULT hr;
len += lstrlenW( class ) + lstrlenW( method );
- if (!(query = heap_alloc( len * sizeof(WCHAR) ))) return E_OUTOFMEMORY;
+ if (!(query = malloc( len * sizeof(WCHAR) ))) return E_OUTOFMEMORY;
swprintf( query, len, selectW, class, method, dir >= 0 ? L">=0" : L"<=0" );
hr = exec_query( ns, query, &iter );
- heap_free( query );
+ free( query );
if (hr != S_OK) return hr;
if (!count_instances( iter ))
@@ -876,7 +875,7 @@ HRESULT create_signature( enum wbm_namespace ns, const WCHAR *class, const WCHAR
if (hr == S_OK)
hr = get_object( ns, name, sig );
- heap_free( name );
+ free( name );
return hr;
}
@@ -1064,15 +1063,14 @@ HRESULT create_class_object( enum wbm_namespace ns, const WCHAR *name, IEnumWbem
TRACE("%s, %p\n", debugstr_w(name), obj);
- co = heap_alloc( sizeof(*co) );
- if (!co) return E_OUTOFMEMORY;
+ if (!(co = malloc( sizeof(*co) ))) return E_OUTOFMEMORY;
co->IWbemClassObject_iface.lpVtbl = &class_object_vtbl;
co->refs = 1;
if (!name) co->name = NULL;
else if (!(co->name = heap_strdupW( name )))
{
- heap_free( co );
+ free( co );
return E_OUTOFMEMORY;
}
co->iter = iter;
diff --git a/dlls/wbemprox/qualifier.c b/dlls/wbemprox/qualifier.c
index 73075b85a06..aa032388759 100644
--- a/dlls/wbemprox/qualifier.c
+++ b/dlls/wbemprox/qualifier.c
@@ -60,9 +60,9 @@ static ULONG WINAPI qualifier_set_Release(
if (!refs)
{
TRACE("destroying %p\n", set);
- heap_free( set->class );
- heap_free( set->member );
- heap_free( set );
+ free( set->class );
+ free( set->member );
+ free( set );
}
return refs;
}
@@ -103,24 +103,24 @@ static HRESULT create_qualifier_enum( enum wbm_namespace ns, const WCHAR *class,
if (member && name)
{
len = lstrlenW( class ) + lstrlenW( member ) + lstrlenW( name ) + ARRAY_SIZE(fmtW);
- if (!(query = heap_alloc( len * sizeof(WCHAR) ))) return E_OUTOFMEMORY;
+ if (!(query = malloc( len * sizeof(WCHAR) ))) return E_OUTOFMEMORY;
swprintf( query, len, fmtW, class, member, name );
}
else if (member)
{
len = lstrlenW( class ) + lstrlenW( member ) + ARRAY_SIZE(fmt2W);
- if (!(query = heap_alloc( len * sizeof(WCHAR) ))) return E_OUTOFMEMORY;
+ if (!(query = malloc( len * sizeof(WCHAR) ))) return E_OUTOFMEMORY;
swprintf( query, len, fmt2W, class, member );
}
else
{
len = lstrlenW( class ) + ARRAY_SIZE(fmt3W);
- if (!(query = heap_alloc( len * sizeof(WCHAR) ))) return E_OUTOFMEMORY;
+ if (!(query = malloc( len * sizeof(WCHAR) ))) return E_OUTOFMEMORY;
swprintf( query, len, fmt3W, class );
}
hr = exec_query( ns, query, iter );
- heap_free( query );
+ free( query );
return hr;
}
@@ -279,19 +279,19 @@ HRESULT WbemQualifierSet_create( enum wbm_namespace ns, const WCHAR *class, cons
TRACE("%p\n", ppObj);
- if (!(set = heap_alloc( sizeof(*set) ))) return E_OUTOFMEMORY;
+ if (!(set = malloc( sizeof(*set) ))) return E_OUTOFMEMORY;
set->IWbemQualifierSet_iface.lpVtbl = &qualifier_set_vtbl;
if (!(set->class = heap_strdupW( class )))
{
- heap_free( set );
+ free( set );
return E_OUTOFMEMORY;
}
if (!member) set->member = NULL;
else if (!(set->member = heap_strdupW( member )))
{
- heap_free( set->class );
- heap_free( set );
+ free( set->class );
+ free( set );
return E_OUTOFMEMORY;
}
set->ns = ns;
diff --git a/dlls/wbemprox/query.c b/dlls/wbemprox/query.c
index 63007565766..56631cbca9e 100644
--- a/dlls/wbemprox/query.c
+++ b/dlls/wbemprox/query.c
@@ -32,7 +32,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wbemprox);
static HRESULT append_table( struct view *view, struct table *table )
{
struct table **tmp;
- if (!(tmp = heap_realloc( view->table, (view->table_count + 1) * sizeof(*tmp) ))) return E_OUTOFMEMORY;
+ if (!(tmp = realloc( view->table, (view->table_count + 1) * sizeof(*tmp) ))) return E_OUTOFMEMORY;
view->table = tmp;
view->table[view->table_count++] = table;
return S_OK;
@@ -41,7 +41,7 @@ static HRESULT append_table( struct view *view, struct table *table )
HRESULT create_view( enum view_type type, enum wbm_namespace ns, const WCHAR *path, const struct keyword *keywordlist,
const WCHAR *class, const struct property *proplist, const struct expr *cond, struct view **ret )
{
- struct view *view = heap_alloc_zero( sizeof(*view) );
+ struct view *view = calloc( 1, sizeof(*view) );
if (!view) return E_OUTOFMEMORY;
@@ -59,7 +59,7 @@ HRESULT create_view( enum view_type type, enum wbm_namespace ns, const WCHAR *pa
if (table && (hr = append_table( view, table )) != S_OK)
{
- heap_free( view );
+ free( view );
return hr;
}
else if (!table && ns == WBEMPROX_NAMESPACE_LAST) return WBEM_E_INVALID_CLASS;
@@ -69,7 +69,7 @@ HRESULT create_view( enum view_type type, enum wbm_namespace ns, const WCHAR *pa
}
default:
ERR( "unhandled type %u\n", type );
- heap_free( view );
+ free( view );
return E_INVALIDARG;
}
@@ -84,9 +84,9 @@ void destroy_view( struct view *view )
ULONG i;
if (!view) return;
for (i = 0; i < view->table_count; i++) release_table( view->table[i] );
- heap_free( view->table );
- heap_free( view->result );
- heap_free( view );
+ free( view->table );
+ free( view->result );
+ free( view );
}
static BOOL eval_like( const WCHAR *lstr, const WCHAR *rstr )
@@ -477,7 +477,7 @@ static WCHAR *build_assoc_query( const WCHAR *class, UINT class_len )
UINT len = class_len + ARRAY_SIZE(fmtW);
WCHAR *ret;
- if (!(ret = heap_alloc( len * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( len * sizeof(WCHAR) ))) return NULL;
swprintf( ret, len, fmtW, class );
return ret;
}
@@ -490,7 +490,7 @@ static HRESULT create_assoc_enum( enum wbm_namespace ns, const WCHAR *class, UIN
if (!(query = build_assoc_query( class, class_len ))) return E_OUTOFMEMORY;
hr = exec_query( ns, query, iter );
- heap_free( query );
+ free( query );
return hr;
}
@@ -500,7 +500,7 @@ static WCHAR *build_antecedent_query( const WCHAR *assocclass, const WCHAR *depe
UINT len = lstrlenW(assocclass) + lstrlenW(dependent) + ARRAY_SIZE(fmtW);
WCHAR *ret;
- if (!(ret = heap_alloc( len * sizeof(WCHAR) ))) return NULL;
+ if (!(ret = malloc( len * sizeof(WCHAR) ))) return NULL;
swprintf( ret, len, fmtW, assocclass, dependent );
return ret;
}
@@ -534,7 +534,7 @@ static WCHAR *build_canonical_path( const WCHAR *relpath )
}
len = ARRAY_SIZE( L"\\\\%s\\%s:" ) + SysStringLen( server ) + SysStringLen( namespace ) + lstrlenW( relpath );
- if ((ret = heap_alloc( len * sizeof(WCHAR ) )))
+ if ((ret = malloc( len * sizeof(WCHAR ) )))
{
len = swprintf( ret, len, L"\\\\%s\\%s:", server, namespace );
for (i = 0; i < lstrlenW( relpath ); i ++)
@@ -577,8 +577,8 @@ static HRESULT get_antecedent( enum wbm_namespace ns, const WCHAR *assocclass, c
done:
if (iter) IEnumWbemClassObject_Release( iter );
- heap_free( str );
- heap_free( fullpath );
+ free( str );
+ free( fullpath );
return hr;
}
@@ -627,7 +627,7 @@ done:
if (query) release_query( query );
free_path( path );
SysFreeString( antecedent );
- heap_free( str );
+ free( str );
return hr;
}
@@ -671,7 +671,7 @@ static HRESULT exec_assoc_view( struct view *view )
if (view->table_count)
{
- if (!(view->result = heap_alloc_zero( view->table_count * sizeof(UINT) ))) hr = E_OUTOFMEMORY;
+ if (!(view->result = calloc( view->table_count, sizeof(UINT) ))) hr = E_OUTOFMEMORY;
else view->result_count = view->table_count;
}
@@ -699,7 +699,7 @@ static HRESULT exec_select_view( struct view *view )
if (!table->num_rows) return S_OK;
len = min( table->num_rows, 16 );
- if (!(view->result = heap_alloc( len * sizeof(UINT) ))) return E_OUTOFMEMORY;
+ if (!(view->result = malloc( len * sizeof(UINT) ))) return E_OUTOFMEMORY;
for (i = 0; i < table->num_rows; i++)
{
@@ -711,7 +711,7 @@ static HRESULT exec_select_view( struct view *view )
{
UINT *tmp;
len *= 2;
- if (!(tmp = heap_realloc( view->result, len * sizeof(UINT) ))) return E_OUTOFMEMORY;
+ if (!(tmp = realloc( view->result, len * sizeof(UINT) ))) return E_OUTOFMEMORY;
view->result = tmp;
}
if (status == FILL_STATUS_FILTERED) val = 1;
@@ -743,7 +743,7 @@ struct query *create_query( enum wbm_namespace ns )
{
struct query *query;
- if (!(query = heap_alloc( sizeof(*query) ))) return NULL;
+ if (!(query = malloc( sizeof(*query) ))) return NULL;
list_init( &query->mem );
query->ns = ns;
query->refs = 1;
@@ -756,8 +756,8 @@ void free_query( struct query *query )
if (!query) return;
destroy_view( query->view );
- LIST_FOR_EACH_SAFE( mem, next, &query->mem ) { heap_free( mem ); }
- heap_free( query );
+ LIST_FOR_EACH_SAFE( mem, next, &query->mem ) { free( mem ); }
+ free( query );
}
struct query *addref_query( struct query *query )
@@ -811,7 +811,7 @@ static BSTR build_proplist( const struct table *table, UINT row, UINT count, UIN
UINT i, j, offset;
BSTR *values, ret = NULL;
- if (!(values = heap_alloc( count * sizeof(BSTR) ))) return NULL;
+ if (!(values = malloc( count * sizeof(BSTR) ))) return NULL;
*len = j = 0;
for (i = 0; i < table->num_cols; i++)
@@ -839,7 +839,7 @@ static BSTR build_proplist( const struct table *table, UINT row, UINT count, UIN
}
}
for (i = 0; i < count; i++) SysFreeString( values[i] );
- heap_free( values );
+ free( values );
return ret;
}
@@ -1278,13 +1278,13 @@ static struct array *to_array( VARIANT *var, CIMTYPE *type )
if (SafeArrayGetVartype( V_ARRAY( var ), &vartype ) != S_OK) return NULL;
if (!(basetype = to_cimtype( vartype ))) return NULL;
if (SafeArrayGetUBound( V_ARRAY( var ), 1, &bound ) != S_OK) return NULL;
- if (!(ret = heap_alloc( sizeof(struct array) ))) return NULL;
+ if (!(ret = malloc( sizeof(struct array) ))) return NULL;
ret->count = bound + 1;
ret->elem_size = get_type_size( basetype );
- if (!(ret->ptr = heap_alloc_zero( ret->count * ret->elem_size )))
+ if (!(ret->ptr = calloc( ret->count, ret->elem_size )))
{
- heap_free( ret );
+ free( ret );
return NULL;
}
for (i = 0; i < ret->count; i++)
diff --git a/dlls/wbemprox/reg.c b/dlls/wbemprox/reg.c
index 361f0ec4b4a..eaa1db8bdde 100644
--- a/dlls/wbemprox/reg.c
+++ b/dlls/wbemprox/reg.c
@@ -171,11 +171,11 @@ static HRESULT enum_key( HKEY root, const WCHAR *subkey, VARIANT *names, IWbemCo
TRACE("%p, %s\n", root, debugstr_w(subkey));
- if (!(strings = heap_alloc( count * sizeof(BSTR) ))) return E_OUTOFMEMORY;
+ if (!(strings = malloc( count * sizeof(BSTR) ))) return E_OUTOFMEMORY;
if ((res = RegOpenKeyExW( root, subkey, 0, KEY_ENUMERATE_SUB_KEYS | reg_get_access_mask( context ), &hkey )))
{
set_variant( VT_UI4, res, NULL, retval );
- heap_free( strings );
+ free( strings );
return S_OK;
}
for (;;)
@@ -183,7 +183,7 @@ static HRESULT enum_key( HKEY root, const WCHAR *subkey, VARIANT *names, IWbemCo
if (i >= count)
{
count *= 2;
- if (!(tmp = heap_realloc( strings, count * sizeof(BSTR) )))
+ if (!(tmp = realloc( strings, count * sizeof(BSTR) )))
{
RegCloseKey( hkey );
return E_OUTOFMEMORY;
@@ -211,7 +211,7 @@ static HRESULT enum_key( HKEY root, const WCHAR *subkey, VARIANT *names, IWbemCo
}
set_variant( VT_UI4, res, NULL, retval );
RegCloseKey( hkey );
- heap_free( strings );
+ free( strings );
return hr;
}
@@ -287,9 +287,9 @@ static HRESULT enum_values( HKEY root, const WCHAR *subkey, VARIANT *names, VARI
goto done;
hr = E_OUTOFMEMORY;
- if (!(buf = heap_alloc( (buflen + 1) * sizeof(WCHAR) ))) goto done;
- if (!(value_names = heap_alloc( count * sizeof(BSTR) ))) goto done;
- if (!(value_types = heap_alloc( count * sizeof(DWORD) ))) goto done;
+ if (!(buf = malloc( (buflen + 1) * sizeof(WCHAR) ))) goto done;
+ if (!(value_names = malloc( count * sizeof(BSTR) ))) goto done;
+ if (!(value_types = malloc( count * sizeof(DWORD) ))) goto done;
hr = S_OK;
for (;;)
@@ -320,9 +320,9 @@ static HRESULT enum_values( HKEY root, const WCHAR *subkey, VARIANT *names, VARI
done:
set_variant( VT_UI4, res, NULL, retval );
RegCloseKey( hkey );
- heap_free( value_names );
- heap_free( value_types );
- heap_free( buf );
+ free( value_names );
+ free( value_types );
+ free( buf );
return hr;
}
diff --git a/dlls/wbemprox/services.c b/dlls/wbemprox/services.c
index 1c54cf3123e..5184bf4a4fa 100644
--- a/dlls/wbemprox/services.c
+++ b/dlls/wbemprox/services.c
@@ -168,7 +168,7 @@ static void free_async( struct async_header *async )
if (async->sink) IWbemObjectSink_Release( async->sink );
CloseHandle( async->cancel );
CloseHandle( async->wait );
- heap_free( async );
+ free( async );
}
static BOOL init_async( struct async_header *async, IWbemObjectSink *sink,
@@ -247,7 +247,7 @@ static ULONG WINAPI wbem_services_Release(
DeleteCriticalSection( &ws->cs );
if (ws->context)
IWbemContext_Release( ws->context );
- heap_free( ws );
+ free( ws );
}
return refs;
}
@@ -342,7 +342,7 @@ HRESULT parse_path( const WCHAR *str, struct path **ret )
const WCHAR *p = str, *q;
UINT len;
- if (!(path = heap_alloc_zero( sizeof(*path) ))) return E_OUTOFMEMORY;
+ if (!(path = calloc( 1, sizeof(*path) ))) return E_OUTOFMEMORY;
if (*p == '\\')
{
@@ -353,7 +353,7 @@ HRESULT parse_path( const WCHAR *str, struct path **ret )
p++;
if (*p != '\\')
{
- heap_free( path );
+ free( path );
return WBEM_E_INVALID_OBJECT_PATH;
}
p++;
@@ -362,14 +362,14 @@ HRESULT parse_path( const WCHAR *str, struct path **ret )
while (*p && *p != '\\') p++;
if (!*p)
{
- heap_free( path );
+ free( path );
return WBEM_E_INVALID_OBJECT_PATH;
}
len = p - q;
if (!GetComputerNameW( server, &server_len ) || server_len != len || wcsnicmp( q, server, server_len ))
{
- heap_free( path );
+ free( path );
return WBEM_E_NOT_SUPPORTED;
}
@@ -377,14 +377,14 @@ HRESULT parse_path( const WCHAR *str, struct path **ret )
while (*p && *p != ':') p++;
if (!*p)
{
- heap_free( path );
+ free( path );
return WBEM_E_INVALID_OBJECT_PATH;
}
len = p - q;
if (len != ARRAY_SIZE(cimv2W) - 1 || wcsnicmp( q, cimv2W, ARRAY_SIZE(cimv2W) - 1 ))
{
- heap_free( path );
+ free( path );
return WBEM_E_INVALID_NAMESPACE;
}
p++;
@@ -394,9 +394,9 @@ HRESULT parse_path( const WCHAR *str, struct path **ret )
while (*p && *p != '.') p++;
len = p - q;
- if (!(path->class = heap_alloc( (len + 1) * sizeof(WCHAR) )))
+ if (!(path->class = malloc( (len + 1) * sizeof(WCHAR) )))
{
- heap_free( path );
+ free( path );
return E_OUTOFMEMORY;
}
memcpy( path->class, q, len * sizeof(WCHAR) );
@@ -409,10 +409,10 @@ HRESULT parse_path( const WCHAR *str, struct path **ret )
while (*q) q++;
len = q - p;
- if (!(path->filter = heap_alloc( (len + 1) * sizeof(WCHAR) )))
+ if (!(path->filter = malloc( (len + 1) * sizeof(WCHAR) )))
{
- heap_free( path->class );
- heap_free( path );
+ free( path->class );
+ free( path );
return E_OUTOFMEMORY;
}
memcpy( path->filter, p, len * sizeof(WCHAR) );
@@ -426,9 +426,9 @@ HRESULT parse_path( const WCHAR *str, struct path **ret )
void free_path( struct path *path )
{
if (!path) return;
- heap_free( path->class );
- heap_free( path->filter );
- heap_free( path );
+ free( path->class );
+ free( path->filter );
+ free( path );
}
WCHAR *query_from_path( const struct path *path )
@@ -441,13 +441,13 @@ WCHAR *query_from_path( const struct path *path )
if (path->filter)
{
len = path->class_len + path->filter_len + ARRAY_SIZE(selectW);
- if (!(query = heap_alloc( len * sizeof(WCHAR) ))) return NULL;
+ if (!(query = malloc( len * sizeof(WCHAR) ))) return NULL;
swprintf( query, len, selectW, path->class, path->filter );
}
else
{
len = path->class_len + ARRAY_SIZE(select_allW);
- if (!(query = heap_alloc( len * sizeof(WCHAR) ))) return NULL;
+ if (!(query = malloc( len * sizeof(WCHAR) ))) return NULL;
lstrcpyW( query, select_allW );
lstrcatW( query, path->class );
}
@@ -461,7 +461,7 @@ static HRESULT create_instance_enum( enum wbm_namespace ns, const struct path *p
if (!(query = query_from_path( path ))) return E_OUTOFMEMORY;
hr = exec_query( ns, query, iter );
- heap_free( query );
+ free( query );
return hr;
}
@@ -707,7 +707,7 @@ static void async_exec_query( struct async_header *hdr )
IEnumWbemClassObject_Release( result );
}
IWbemObjectSink_SetStatus( query->hdr.sink, WBEM_STATUS_COMPLETE, hr, NULL, NULL );
- heap_free( query->str );
+ free( query->str );
}
static HRESULT WINAPI wbem_services_ExecQueryAsync(
@@ -740,7 +740,7 @@ static HRESULT WINAPI wbem_services_ExecQueryAsync(
hr = WBEM_E_FAILED;
goto done;
}
- if (!(query = heap_alloc_zero( sizeof(*query) ))) goto done;
+ if (!(query = calloc( 1, sizeof(*query) ))) goto done;
query->ns = services->ns;
async = (struct async_header *)query;
@@ -758,7 +758,7 @@ static HRESULT WINAPI wbem_services_ExecQueryAsync(
if (hr == S_OK) services->async = async;
else
{
- heap_free( query->str );
+ free( query->str );
free_async( async );
}
@@ -810,7 +810,7 @@ static HRESULT WINAPI wbem_services_ExecNotificationQueryAsync(
hr = WBEM_E_FAILED;
goto done;
}
- if (!(query = heap_alloc_zero( sizeof(*query) ))) goto done;
+ if (!(query = calloc( 1, sizeof(*query) ))) goto done;
async = (struct async_header *)query;
if (!(init_async( async, sink, async_exec_query )))
@@ -827,7 +827,7 @@ static HRESULT WINAPI wbem_services_ExecNotificationQueryAsync(
if (hr == S_OK) services->async = async;
else
{
- heap_free( query->str );
+ free( query->str );
free_async( async );
}
@@ -896,7 +896,7 @@ done:
if (obj) IWbemClassObject_Release( obj );
free_query( query );
free_path( path );
- heap_free( str );
+ free( str );
return hr;
}
@@ -955,8 +955,7 @@ HRESULT WbemServices_create( const WCHAR *namespace, IWbemContext *context, LPVO
else if ((ns = get_namespace_from_string( namespace )) == WBEMPROX_NAMESPACE_LAST)
return WBEM_E_INVALID_NAMESPACE;
- ws = heap_alloc_zero( sizeof(*ws) );
- if (!ws) return E_OUTOFMEMORY;
+ if (!(ws = calloc( 1, sizeof(*ws) ))) return E_OUTOFMEMORY;
ws->IWbemServices_iface.lpVtbl = &wbem_services_vtbl;
ws->refs = 1;
@@ -994,8 +993,8 @@ static void wbem_context_delete_values(struct wbem_context *context)
{
list_remove( &value->entry );
VariantClear( &value->value );
- heap_free( value->name );
- heap_free( value );
+ free( value->name );
+ free( value );
}
}
@@ -1043,7 +1042,7 @@ static ULONG WINAPI wbem_context_Release(
{
TRACE("destroying %p\n", context);
wbem_context_delete_values( context );
- heap_free( context );
+ free( context );
}
return refs;
}
@@ -1152,16 +1151,16 @@ static HRESULT WINAPI wbem_context_SetValue(
}
else
{
- if (!(value = heap_alloc_zero( sizeof(*value) ))) return E_OUTOFMEMORY;
+ if (!(value = calloc( 1, sizeof(*value) ))) return E_OUTOFMEMORY;
if (!(value->name = heap_strdupW( name )))
{
- heap_free( value );
+ free( value );
return E_OUTOFMEMORY;
}
if (FAILED(hr = VariantCopy( &value->value, var )))
{
- heap_free( value->name );
- heap_free( value );
+ free( value->name );
+ free( value );
return hr;
}
@@ -1232,8 +1231,7 @@ HRESULT WbemContext_create( void **obj )
TRACE("(%p)\n", obj);
- context = heap_alloc( sizeof(*context) );
- if (!context) return E_OUTOFMEMORY;
+ if (!(context = malloc( sizeof(*context) ))) return E_OUTOFMEMORY;
context->IWbemContext_iface.lpVtbl = &wbem_context_vtbl;
context->refs = 1;
diff --git a/dlls/wbemprox/table.c b/dlls/wbemprox/table.c
index 02551af6eed..d08646a1c50 100644
--- a/dlls/wbemprox/table.c
+++ b/dlls/wbemprox/table.c
@@ -291,7 +291,7 @@ void free_row_values( const struct table *table, UINT row )
type = table->columns[i].type & COL_TYPE_MASK;
if (type == CIM_STRING || type == CIM_DATETIME || type == CIM_REFERENCE)
{
- if (get_value( table, row, i, &val ) == S_OK) heap_free( (void *)(INT_PTR)val );
+ if (get_value( table, row, i, &val ) == S_OK) free( (void *)(INT_PTR)val );
}
else if (type & CIM_FLAG_ARRAY)
{
@@ -312,7 +312,7 @@ void clear_table( struct table *table )
{
table->num_rows = 0;
table->num_rows_allocated = 0;
- heap_free( table->data );
+ free( table->data );
table->data = NULL;
}
}
@@ -321,8 +321,8 @@ void free_columns( struct column *columns, UINT num_cols )
{
UINT i;
- for (i = 0; i < num_cols; i++) { heap_free( (WCHAR *)columns[i].name ); }
- heap_free( columns );
+ for (i = 0; i < num_cols; i++) { free( (WCHAR *)columns[i].name ); }
+ free( columns );
}
void free_table( struct table *table )
@@ -333,11 +333,11 @@ void free_table( struct table *table )
if (table->flags & TABLE_FLAG_DYNAMIC)
{
TRACE("destroying %p\n", table);
- heap_free( (WCHAR *)table->name );
+ free( (WCHAR *)table->name );
free_columns( (struct column *)table->columns, table->num_cols );
- heap_free( table->data );
+ free( table->data );
list_remove( &table->entry );
- heap_free( table );
+ free( table );
}
}
@@ -375,7 +375,7 @@ struct table *create_table( const WCHAR *name, UINT num_cols, const struct colum
{
struct table *table;
- if (!(table = heap_alloc( sizeof(*table) ))) return NULL;
+ if (!(table = malloc( sizeof(*table) ))) return NULL;
table->name = heap_strdupW( name );
table->num_cols = num_cols;
table->columns = columns;
diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c
index a57a4398da3..954d39d244b 100644
--- a/dlls/wbemprox/tests/query.c
+++ b/dlls/wbemprox/tests/query.c
@@ -25,7 +25,6 @@
#include "initguid.h"
#include "objidl.h"
#include "wbemcli.h"
-#include "wine/heap.h"
#include "wine/test.h"
static HRESULT exec_query( IWbemServices *services, const WCHAR *str, IEnumWbemClassObject **result )
@@ -195,7 +194,7 @@ static void test_IEnumWbemClassObject_Next( IWbemServices *services )
hr = IEnumWbemClassObject_Reset( result );
ok( hr == S_OK, "got %08x\n", hr );
- obj = heap_alloc( num_objects * sizeof( IWbemClassObject * ) );
+ obj = malloc( num_objects * sizeof( IWbemClassObject * ) );
count = 0;
hr = IEnumWbemClassObject_Next( result, 10000, num_objects, obj, &count );
@@ -216,7 +215,7 @@ static void test_IEnumWbemClassObject_Next( IWbemServices *services )
for (i = 0; i < count; i++)
IWbemClassObject_Release( obj[i] );
- heap_free( obj );
+ free( obj );
IEnumWbemClassObject_Release( result );
SysFreeString( query );
diff --git a/dlls/wbemprox/wbemlocator.c b/dlls/wbemprox/wbemlocator.c
index dc2a13deda3..58cb4a86991 100644
--- a/dlls/wbemprox/wbemlocator.c
+++ b/dlls/wbemprox/wbemlocator.c
@@ -56,7 +56,7 @@ static ULONG WINAPI wbem_locator_Release(
if (!refs)
{
TRACE("destroying %p\n", wl);
- heap_free( wl );
+ free( wl );
}
return refs;
}
@@ -113,7 +113,7 @@ static HRESULT parse_resource( const WCHAR *resource, WCHAR **server, WCHAR **na
while (*q && *q != '\\' && *q != '/') q++;
if (!*q) return WBEM_E_INVALID_NAMESPACE;
len = q - p;
- if (!(*server = heap_alloc( (len + 1) * sizeof(WCHAR) )))
+ if (!(*server = malloc( (len + 1) * sizeof(WCHAR) )))
{
hr = E_OUTOFMEMORY;
goto done;
@@ -134,7 +134,7 @@ static HRESULT parse_resource( const WCHAR *resource, WCHAR **server, WCHAR **na
}
q++;
len = lstrlenW( q );
- if (!(*namespace = heap_alloc( (len + 1) * sizeof(WCHAR) ))) hr = E_OUTOFMEMORY;
+ if (!(*namespace = malloc( (len + 1) * sizeof(WCHAR) ))) hr = E_OUTOFMEMORY;
else
{
memcpy( *namespace, q, len * sizeof(WCHAR) );
@@ -145,8 +145,8 @@ static HRESULT parse_resource( const WCHAR *resource, WCHAR **server, WCHAR **na
done:
if (hr != S_OK)
{
- heap_free( *server );
- heap_free( *namespace );
+ free( *server );
+ free( *namespace );
}
return hr;
}
@@ -174,8 +174,8 @@ static HRESULT WINAPI wbem_locator_ConnectServer(
if (!is_local_machine( server ))
{
FIXME("remote computer not supported\n");
- heap_free( server );
- heap_free( namespace );
+ free( server );
+ free( namespace );
return WBEM_E_TRANSPORT_FAILURE;
}
if (User || Password || Authority)
@@ -186,8 +186,8 @@ static HRESULT WINAPI wbem_locator_ConnectServer(
FIXME("unsupported flags\n");
hr = WbemServices_create( namespace, context, (void **)ppNamespace );
- heap_free( namespace );
- heap_free( server );
+ free( namespace );
+ free( server );
if (SUCCEEDED( hr ))
return WBEM_NO_ERROR;
@@ -208,8 +208,7 @@ HRESULT WbemLocator_create( LPVOID *ppObj )
TRACE("(%p)\n", ppObj);
- wl = heap_alloc( sizeof(*wl) );
- if (!wl) return E_OUTOFMEMORY;
+ if (!(wl = malloc( sizeof(*wl) ))) return E_OUTOFMEMORY;
wl->IWbemLocator_iface.lpVtbl = &wbem_locator_vtbl;
wl->refs = 1;
diff --git a/dlls/wbemprox/wbemprox_private.h b/dlls/wbemprox/wbemprox_private.h
index a2bf5071612..9e900132419 100644
--- a/dlls/wbemprox/wbemprox_private.h
+++ b/dlls/wbemprox/wbemprox_private.h
@@ -17,7 +17,6 @@
*/
#include "wine/debug.h"
-#include "wine/heap.h"
#include "wine/list.h"
enum wbm_namespace
@@ -280,7 +279,7 @@ static inline WCHAR *heap_strdupW( const WCHAR *src )
{
WCHAR *dst;
if (!src) return NULL;
- if ((dst = heap_alloc( (lstrlenW( src ) + 1) * sizeof(WCHAR) ))) lstrcpyW( dst, src );
+ if ((dst = malloc( (lstrlenW( src ) + 1) * sizeof(WCHAR) ))) lstrcpyW( dst, src );
return dst;
}
@@ -290,7 +289,7 @@ static inline WCHAR *heap_strdupAW( const char *src )
WCHAR *dst;
if (!src) return NULL;
len = MultiByteToWideChar( CP_ACP, 0, src, -1, NULL, 0 );
- if ((dst = heap_alloc( len * sizeof(*dst) ))) MultiByteToWideChar( CP_ACP, 0, src, -1, dst, len );
+ if ((dst = malloc( len * sizeof(*dst) ))) MultiByteToWideChar( CP_ACP, 0, src, -1, dst, len );
return dst;
}
diff --git a/dlls/wbemprox/wql.y b/dlls/wbemprox/wql.y
index d1b608ac832..637eb6f05fa 100644
--- a/dlls/wbemprox/wql.y
+++ b/dlls/wbemprox/wql.y
@@ -49,7 +49,7 @@ struct string
static void *alloc_mem( struct parser *parser, UINT size )
{
- struct list *mem = heap_alloc( sizeof(struct list) + size );
+ struct list *mem = malloc( sizeof(struct list) + size );
list_add_tail( parser->mem, mem );
return &mem[1];
}
--
2.30.2
1
0
2
1
[PATCH v2 1/2] msxml3/tests: Add test saving XML with non-english characters.
by Daniel Lehman 31 Jan '22
by Daniel Lehman 31 Jan '22
31 Jan '22
v2: added some Releases
2
1
31 Jan '22
Fix these failures:
> win.c:2445: Test failed: style 0x200000: expected !100
> win.c:2445: Test failed: style 0x300000: expected !100
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/user32/tests/win.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/user32/tests/win.c b/dlls/user32/tests/win.c
index cb6b61e59c0..e48d7bea513 100644
--- a/dlls/user32/tests/win.c
+++ b/dlls/user32/tests/win.c
@@ -2249,7 +2249,7 @@ static void test_mdi(void)
mdi_hwndMain = CreateWindowExA(0, "MDI_parent_Class", "MDI parent window",
WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX |
WS_MAXIMIZEBOX /*| WS_VISIBLE*/,
- 100, 100, CW_USEDEFAULT, CW_USEDEFAULT,
+ 200, 100, CW_USEDEFAULT, CW_USEDEFAULT,
GetDesktopWindow(), 0,
GetModuleHandleA(NULL), NULL);
assert(mdi_hwndMain);
--
2.34.1
2
10
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de>
---
configure | 2 +
configure.ac | 1 +
dlls/windows.foundation.metadata/Makefile.in | 8 +
dlls/windows.foundation.metadata/classes.idl | 23 +++
dlls/windows.foundation.metadata/main.c | 157 ++++++++++++++++++
.../windows.foundation.metadata.spec | 3 +
include/Makefile.in | 1 +
include/windows.foundation.metadata.idl | 52 ++++++
8 files changed, 247 insertions(+)
create mode 100644 dlls/windows.foundation.metadata/Makefile.in
create mode 100644 dlls/windows.foundation.metadata/classes.idl
create mode 100644 dlls/windows.foundation.metadata/main.c
create mode 100644 dlls/windows.foundation.metadata/windows.foundation.metadata.spec
create mode 100644 include/windows.foundation.metadata.idl
diff --git a/configure b/configure
index 425d267ec50..f7f8cb581ef 100755
--- a/configure
+++ b/configure
@@ -1704,6 +1704,7 @@ enable_wiaservc
enable_wimgapi
enable_win32u
enable_windows_devices_enumeration
+enable_windows_foundation_metadata
enable_windows_gaming_input
enable_windows_globalization
enable_windows_media_devices
@@ -22470,6 +22471,7 @@ wine_fn_config_makefile dlls/win87em.dll16 enable_win16
wine_fn_config_makefile dlls/winaspi.dll16 enable_win16
wine_fn_config_makefile dlls/windebug.dll16 enable_win16
wine_fn_config_makefile dlls/windows.devices.enumeration enable_windows_devices_enumeration
+wine_fn_config_makefile dlls/windows.foundation.metadata enable_windows_foundation_metadata
wine_fn_config_makefile dlls/windows.gaming.input enable_windows_gaming_input
wine_fn_config_makefile dlls/windows.gaming.input/tests enable_tests
wine_fn_config_makefile dlls/windows.globalization enable_windows_globalization
diff --git a/configure.ac b/configure.ac
index fed12f61036..c66c6fd462f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3366,6 +3366,7 @@ WINE_CONFIG_MAKEFILE(dlls/win87em.dll16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/winaspi.dll16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/windebug.dll16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/windows.devices.enumeration)
+WINE_CONFIG_MAKEFILE(dlls/windows.foundation.metadata)
WINE_CONFIG_MAKEFILE(dlls/windows.gaming.input)
WINE_CONFIG_MAKEFILE(dlls/windows.gaming.input/tests)
WINE_CONFIG_MAKEFILE(dlls/windows.globalization)
diff --git a/dlls/windows.foundation.metadata/Makefile.in b/dlls/windows.foundation.metadata/Makefile.in
new file mode 100644
index 00000000000..311cfb0a845
--- /dev/null
+++ b/dlls/windows.foundation.metadata/Makefile.in
@@ -0,0 +1,8 @@
+EXTRADEFS = -DWINE_NO_LONG_TYPES
+MODULE = windows.foundation.metadata.dll
+IMPORTS = combase uuid
+
+C_SRCS = \
+ main.c
+
+IDL_SRCS = classes.idl
diff --git a/dlls/windows.foundation.metadata/classes.idl b/dlls/windows.foundation.metadata/classes.idl
new file mode 100644
index 00000000000..405fa9f1133
--- /dev/null
+++ b/dlls/windows.foundation.metadata/classes.idl
@@ -0,0 +1,23 @@
+/*
+ * Runtime Classes for windows.foundation.metadata.dll
+ *
+ * Copyright 2022 Fabian Maurer
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#pragma makedep register
+
+#include "windows.foundation.metadata.idl"
diff --git a/dlls/windows.foundation.metadata/main.c b/dlls/windows.foundation.metadata/main.c
new file mode 100644
index 00000000000..18a19ad1bca
--- /dev/null
+++ b/dlls/windows.foundation.metadata/main.c
@@ -0,0 +1,157 @@
+/* WinRT Windows.Foundation.Metadata implementation
+ *
+ * Copyright 2022 Fabian Maurer
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#define COBJMACROS
+#include "windef.h"
+#include "winbase.h"
+#include "winstring.h"
+#include "wine/debug.h"
+#include "objbase.h"
+
+#include "initguid.h"
+#include "activation.h"
+
+#define WIDL_using_Windows_Foundation
+#define WIDL_using_Windows_Foundation_Collections
+#include "windows.foundation.h"
+#define WIDL_using_Windows_Foundation_Metadata
+#include "windows.foundation.metadata.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(metadata);
+
+static const char *debugstr_hstring(HSTRING hstr)
+{
+ const WCHAR *str;
+ UINT32 len;
+ if (hstr && !((ULONG_PTR)hstr >> 16)) return "(invalid)";
+ str = WindowsGetStringRawBuffer(hstr, &len);
+ return wine_dbgstr_wn(str, len);
+}
+
+struct windows_foundation_metadata
+{
+ IActivationFactory IActivationFactory_iface;
+ LONG ref;
+};
+
+static inline struct windows_foundation_metadata *impl_from_IActivationFactory(IActivationFactory *iface)
+{
+ return CONTAINING_RECORD(iface, struct windows_foundation_metadata, IActivationFactory_iface);
+}
+
+static HRESULT STDMETHODCALLTYPE windows_foundation_metadata_QueryInterface(
+ IActivationFactory *iface, REFIID iid, void **out)
+{
+ TRACE("iface %p, iid %s, out %p stub!\n", iface, debugstr_guid(iid), out);
+
+ if (IsEqualGUID(iid, &IID_IUnknown) ||
+ IsEqualGUID(iid, &IID_IInspectable) ||
+ IsEqualGUID(iid, &IID_IAgileObject) ||
+ IsEqualGUID(iid, &IID_IActivationFactory))
+ {
+ IUnknown_AddRef(iface);
+ *out = iface;
+ return S_OK;
+ }
+
+ FIXME("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
+ *out = NULL;
+ return E_NOINTERFACE;
+}
+
+static ULONG STDMETHODCALLTYPE windows_foundation_metadata_AddRef(
+ IActivationFactory *iface)
+{
+ struct windows_foundation_metadata *impl = impl_from_IActivationFactory(iface);
+ ULONG ref = InterlockedIncrement(&impl->ref);
+ TRACE("iface %p, ref %u.\n", iface, ref);
+ return ref;
+}
+
+static ULONG STDMETHODCALLTYPE windows_foundation_metadata_Release(
+ IActivationFactory *iface)
+{
+ struct windows_foundation_metadata *impl = impl_from_IActivationFactory(iface);
+ ULONG ref = InterlockedDecrement(&impl->ref);
+ TRACE("iface %p, ref %u.\n", iface, ref);
+ return ref;
+}
+
+static HRESULT STDMETHODCALLTYPE windows_foundation_metadata_GetIids(
+ IActivationFactory *iface, ULONG *iid_count, IID **iids)
+{
+ FIXME("iface %p, iid_count %p, iids %p stub!\n", iface, iid_count, iids);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE windows_foundation_metadata_GetRuntimeClassName(
+ IActivationFactory *iface, HSTRING *class_name)
+{
+ FIXME("iface %p, class_name %p stub!\n", iface, class_name);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE windows_foundation_metadata_GetTrustLevel(
+ IActivationFactory *iface, TrustLevel *trust_level)
+{
+ FIXME("iface %p, trust_level %p stub!\n", iface, trust_level);
+ return E_NOTIMPL;
+}
+
+static HRESULT STDMETHODCALLTYPE windows_foundation_metadata_ActivateInstance(
+ IActivationFactory *iface, IInspectable **instance)
+{
+ FIXME("iface %p, instance %p stub!\n", iface, instance);
+ return E_NOTIMPL;
+}
+
+static const struct IActivationFactoryVtbl activation_factory_vtbl =
+{
+ windows_foundation_metadata_QueryInterface,
+ windows_foundation_metadata_AddRef,
+ windows_foundation_metadata_Release,
+ /* IInspectable methods */
+ windows_foundation_metadata_GetIids,
+ windows_foundation_metadata_GetRuntimeClassName,
+ windows_foundation_metadata_GetTrustLevel,
+ /* IActivationFactory methods */
+ windows_foundation_metadata_ActivateInstance,
+};
+
+static struct windows_foundation_metadata windows_foundation_metadata =
+{
+ {&activation_factory_vtbl},
+ 1
+};
+
+HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID riid, void **out)
+{
+ FIXME("clsid %s, riid %s, out %p stub!\n", debugstr_guid(clsid), debugstr_guid(riid), out);
+ return CLASS_E_CLASSNOTAVAILABLE;
+}
+
+HRESULT WINAPI DllGetActivationFactory(HSTRING classid, IActivationFactory **factory)
+{
+ TRACE("classid %s, factory %p.\n", debugstr_hstring(classid), factory);
+ *factory = &windows_foundation_metadata.IActivationFactory_iface;
+ IUnknown_AddRef(*factory);
+ return S_OK;
+}
diff --git a/dlls/windows.foundation.metadata/windows.foundation.metadata.spec b/dlls/windows.foundation.metadata/windows.foundation.metadata.spec
new file mode 100644
index 00000000000..20a8bfa98ea
--- /dev/null
+++ b/dlls/windows.foundation.metadata/windows.foundation.metadata.spec
@@ -0,0 +1,3 @@
+@ stdcall -private DllCanUnloadNow()
+@ stdcall -private DllGetActivationFactory(ptr ptr)
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
diff --git a/include/Makefile.in b/include/Makefile.in
index 7fcf5f0ba7b..24c2b3fb448 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -777,6 +777,7 @@ SOURCES = \
windows.devices.enumeration.idl \
windows.foundation.collections.idl \
windows.foundation.idl \
+ windows.foundation.metadata.idl \
windows.gaming.input.forcefeedback.idl \
windows.gaming.input.idl \
windows.globalization.idl \
diff --git a/include/windows.foundation.metadata.idl b/include/windows.foundation.metadata.idl
new file mode 100644
index 00000000000..7673777e658
--- /dev/null
+++ b/include/windows.foundation.metadata.idl
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2022 Fabian Maurer
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifdef __WIDL__
+#pragma winrt ns_prefix
+#endif
+
+import "inspectable.idl";
+import "asyncinfo.idl";
+import "eventtoken.idl";
+import "windowscontracts.idl";
+import "windows.foundation.idl";
+
+namespace Windows {
+ namespace Foundation {
+ namespace Metadata {
+ interface IApiInformationStatics;
+ runtimeclass ApiInformation;
+ }
+ }
+}
+
+namespace Windows {
+ namespace Foundation {
+ namespace Metadata {
+ [
+ contract(Windows.Foundation.UniversalApiContract, 1.0),
+ marshaling_behavior(agile),
+ static(Windows.Foundation.Metadata.IApiInformationStatics, Windows.Foundation.UniversalApiContract, 1.0),
+ threading(both)
+ ]
+ runtimeclass ApiInformation
+ {
+ }
+ }
+ }
+}
--
2.35.1
2
5
31 Jan '22
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de>
---
dlls/propsys/tests/propsys.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/propsys/tests/propsys.c b/dlls/propsys/tests/propsys.c
index 6370c01dc80..792ef1dd785 100644
--- a/dlls/propsys/tests/propsys.c
+++ b/dlls/propsys/tests/propsys.c
@@ -840,7 +840,7 @@ static void test_PropVariantCompareEx(void)
/* VT_R4/VT_R8 */
res = PropVariantCompareEx(&r4_0, &r8_0, 0, 0);
-todo_wine
+ todo_wine
ok(res == 0, "res=%i\n", res);
res = PropVariantCompareEx(&r4_0, &r4_0, 0, 0);
@@ -2014,7 +2014,7 @@ static void test_PSCreatePropertyStoreFromObject(void)
ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
hr = PSCreatePropertyStoreFromObject((IUnknown *)propstore, STGM_READWRITE, &IID_IUnknown, (void **)&unk);
-todo_wine
+ todo_wine
ok(hr == S_OK, "Failed to create wrapper, hr %#x.\n", hr);
if (SUCCEEDED(hr))
{
--
2.35.0
4
18
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51850
Signed-off-by: Mohamad Al-Jaf <mohamadaljaf(a)gmail.com>
---
v6: - Use __ASM_GLOBAL_FUNC instead of __ASM_STDCALL_FUNC.
- Use cdecl instead of stdcall in wdscore.spec.
---
configure.ac | 1 +
dlls/wdscore/Makefile.in | 3 ++
dlls/wdscore/main.c | 56 ++++++++++++++++++++++++++++
dlls/wdscore/tests/Makefile.in | 4 ++
dlls/wdscore/tests/main.c | 65 +++++++++++++++++++++++++++++++++
dlls/wdscore/wdscore.spec | 2 +-
dlls/wdscore/wdscore_internal.h | 24 ++++++++++++
7 files changed, 154 insertions(+), 1 deletion(-)
create mode 100644 dlls/wdscore/main.c
create mode 100644 dlls/wdscore/tests/Makefile.in
create mode 100644 dlls/wdscore/tests/main.c
create mode 100644 dlls/wdscore/wdscore_internal.h
diff --git a/configure.ac b/configure.ac
index 0b1a53f3ff9..1923c95f4b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3345,6 +3345,7 @@ WINE_CONFIG_MAKEFILE(dlls/wbemdisp/tests)
WINE_CONFIG_MAKEFILE(dlls/wbemprox)
WINE_CONFIG_MAKEFILE(dlls/wbemprox/tests)
WINE_CONFIG_MAKEFILE(dlls/wdscore)
+WINE_CONFIG_MAKEFILE(dlls/wdscore/tests)
WINE_CONFIG_MAKEFILE(dlls/webservices)
WINE_CONFIG_MAKEFILE(dlls/webservices/tests)
WINE_CONFIG_MAKEFILE(dlls/websocket)
diff --git a/dlls/wdscore/Makefile.in b/dlls/wdscore/Makefile.in
index 20ba1d3b1c9..2020e72c7bb 100644
--- a/dlls/wdscore/Makefile.in
+++ b/dlls/wdscore/Makefile.in
@@ -1,3 +1,6 @@
MODULE = wdscore.dll
EXTRADLLFLAGS = -Wb,--prefer-native
+
+C_SRCS = \
+ main.c
diff --git a/dlls/wdscore/main.c b/dlls/wdscore/main.c
new file mode 100644
index 00000000000..1ed00206adf
--- /dev/null
+++ b/dlls/wdscore/main.c
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2022 Mohamad Al-Jaf
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+
+#include "wine/asm.h"
+#include "wine/debug.h"
+
+#include "wdscore_internal.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(wdscore);
+
+/***********************************************************************
+ * CurrentIP (wdscore.@)
+ */
+#ifdef __i386__
+__ASM_GLOBAL_FUNC(CurrentIP,
+ "movl (%esp), %eax\n\t"
+ "ret" )
+#elif defined(__x86_64__)
+__ASM_GLOBAL_FUNC(CurrentIP,
+ "movq (%rsp), %rax\n\t"
+ "ret" )
+#elif defined(__arm__)
+__ASM_GLOBAL_FUNC(CurrentIP,
+ "mov r0, lr\n\t"
+ "bx lr" )
+#elif defined(__aarch64__)
+__ASM_GLOBAL_FUNC(CurrentIP,
+ "mov x0, lr\n\t"
+ "ret" )
+#else
+void *CurrentIP(void)
+{
+ FIXME( "not implemented\n" );
+ return 0;
+}
+#endif
diff --git a/dlls/wdscore/tests/Makefile.in b/dlls/wdscore/tests/Makefile.in
new file mode 100644
index 00000000000..baf4adf23a1
--- /dev/null
+++ b/dlls/wdscore/tests/Makefile.in
@@ -0,0 +1,4 @@
+TESTDLL = wdscore.dll
+
+C_SRCS = \
+ main.c
diff --git a/dlls/wdscore/tests/main.c b/dlls/wdscore/tests/main.c
new file mode 100644
index 00000000000..f17abbbdb3f
--- /dev/null
+++ b/dlls/wdscore/tests/main.c
@@ -0,0 +1,65 @@
+/*
+ * Unit test suite for wdscore
+ *
+ * Copyright 2022 Mohamad Al-Jaf
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ *
+ */
+
+#include <stdarg.h>
+
+#include "windef.h"
+#include "winbase.h"
+
+#include "wine/test.h"
+
+static HMODULE dll;
+static void* (*pCurrentIP)(void);
+
+static BOOL init_function_pointers(void)
+{
+ dll = LoadLibraryA("wdscore.dll");
+
+ if (dll)
+ {
+ pCurrentIP = (void*)GetProcAddress(dll, "CurrentIP");
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+static void test_CurrentIP(void)
+{
+ char *cur;
+ char *ret;
+
+ cur = (char*)&test_CurrentIP;
+ ret = (char*)pCurrentIP();
+
+ ok(cur <= ret && ret < (cur + 0x100), "Address %p not in function starting at %p.\n", ret, cur);
+}
+
+START_TEST(main)
+{
+ if (init_function_pointers())
+ {
+ test_CurrentIP();
+ FreeLibrary(dll);
+ }
+ else
+ skip("could not load wdscore.dll\n");
+}
diff --git a/dlls/wdscore/wdscore.spec b/dlls/wdscore/wdscore.spec
index 15958b86aba..c292f65505b 100644
--- a/dlls/wdscore/wdscore.spec
+++ b/dlls/wdscore/wdscore.spec
@@ -71,7 +71,7 @@
@ stub ConstructPartialMsgIfW
@ stub ConstructPartialMsgVA
@ stub ConstructPartialMsgVW
-@ stub CurrentIP
+@ cdecl CurrentIP()
@ stub EndMajorTask
@ stub EndMinorTask
@ stub GetMajorTask
diff --git a/dlls/wdscore/wdscore_internal.h b/dlls/wdscore/wdscore_internal.h
new file mode 100644
index 00000000000..595ce93a3e7
--- /dev/null
+++ b/dlls/wdscore/wdscore_internal.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2022 Mohamad Al-Jaf
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef __WDSCORE_INTERNAL_H
+#define __WDSCORE_INTERNAL_H
+
+void *CurrentIP(void);
+
+#endif /* __WDSCORE_INTERNAL_H */
--
2.35.0
1
3
[PATCH 1/5] windows.gaming.input/tests: Fix printf warnings with long types.
by Rémi Bernon 31 Jan '22
by Rémi Bernon 31 Jan '22
31 Jan '22
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
---
dlls/windows.gaming.input/tests/Makefile.in | 1 -
dlls/windows.gaming.input/tests/input.c | 80 ++++++++++-----------
2 files changed, 40 insertions(+), 41 deletions(-)
diff --git a/dlls/windows.gaming.input/tests/Makefile.in b/dlls/windows.gaming.input/tests/Makefile.in
index 19fb708d0d2..88e1c05fbcf 100644
--- a/dlls/windows.gaming.input/tests/Makefile.in
+++ b/dlls/windows.gaming.input/tests/Makefile.in
@@ -1,4 +1,3 @@
-EXTRADEFS = -DWINE_NO_LONG_TYPES
TESTDLL = windows.gaming.input.dll
IMPORTS = combase uuid
diff --git a/dlls/windows.gaming.input/tests/input.c b/dlls/windows.gaming.input/tests/input.c
index 6e863def54d..5f2244d8666 100644
--- a/dlls/windows.gaming.input/tests/input.c
+++ b/dlls/windows.gaming.input/tests/input.c
@@ -113,13 +113,13 @@ static void test_Gamepad(void)
gamepad_event_handler.IEventHandler_Gamepad_iface.lpVtbl = &gamepad_event_handler_vtbl;
hr = RoInitialize(RO_INIT_MULTITHREADED);
- ok(hr == S_OK, "RoInitialize failed, hr %#x\n", hr);
+ ok(hr == S_OK, "RoInitialize failed, hr %#lx\n", hr);
hr = WindowsCreateString(gamepad_name, wcslen(gamepad_name), &str);
- ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
+ ok(hr == S_OK, "WindowsCreateString failed, hr %#lx\n", hr);
hr = RoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory);
- ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "RoGetActivationFactory failed, hr %#x\n", hr);
+ ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "RoGetActivationFactory failed, hr %#lx\n", hr);
if (hr == REGDB_E_CLASSNOTREG)
{
win_skip("%s runtimeclass not registered, skipping tests.\n", wine_dbgstr_w(gamepad_name));
@@ -127,78 +127,78 @@ static void test_Gamepad(void)
}
hr = IActivationFactory_QueryInterface(factory, &IID_IInspectable, (void **)&inspectable);
- ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IInspectable failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IInspectable failed, hr %#lx\n", hr);
hr = IActivationFactory_QueryInterface(factory, &IID_IAgileObject, (void **)&agile_object);
- ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#lx\n", hr);
hr = IActivationFactory_QueryInterface(factory, &IID_IGamepadStatics, (void **)&gamepad_statics);
- ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IGamepadStatics failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IGamepadStatics failed, hr %#lx\n", hr);
hr = IGamepadStatics_QueryInterface(gamepad_statics, &IID_IInspectable, (void **)&tmp_inspectable);
- ok(hr == S_OK, "IGamepadStatics_QueryInterface IID_IInspectable failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IGamepadStatics_QueryInterface IID_IInspectable failed, hr %#lx\n", hr);
ok(tmp_inspectable == inspectable, "IGamepadStatics_QueryInterface IID_IInspectable returned %p, expected %p\n", tmp_inspectable, inspectable);
IInspectable_Release(tmp_inspectable);
hr = IGamepadStatics_QueryInterface(gamepad_statics, &IID_IAgileObject, (void **)&tmp_agile_object);
- ok(hr == S_OK, "IGamepadStatics_QueryInterface IID_IAgileObject failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IGamepadStatics_QueryInterface IID_IAgileObject failed, hr %#lx\n", hr);
ok(tmp_agile_object == agile_object, "IGamepadStatics_QueryInterface IID_IAgileObject returned %p, expected %p\n", tmp_agile_object, agile_object);
IAgileObject_Release(tmp_agile_object);
hr = IGamepadStatics_get_Gamepads(gamepad_statics, &gamepads);
- ok(hr == S_OK, "IGamepadStatics_get_Gamepads failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IGamepadStatics_get_Gamepads failed, hr %#lx\n", hr);
hr = IVectorView_Gamepad_QueryInterface(gamepads, &IID_IInspectable, (void **)&tmp_inspectable);
- ok(hr == S_OK, "IVectorView_Gamepad_QueryInterface failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_Gamepad_QueryInterface failed, hr %#lx\n", hr);
ok(tmp_inspectable != inspectable, "IVectorView_Gamepad_QueryInterface returned %p, expected %p\n", tmp_inspectable, inspectable);
IInspectable_Release(tmp_inspectable);
hr = IVectorView_Gamepad_QueryInterface(gamepads, &IID_IAgileObject, (void **)&tmp_agile_object);
- ok(hr == S_OK, "IVectorView_Gamepad_QueryInterface failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_Gamepad_QueryInterface failed, hr %#lx\n", hr);
ok(tmp_agile_object != agile_object, "IVectorView_Gamepad_QueryInterface IID_IAgileObject returned agile_object\n");
IAgileObject_Release(tmp_agile_object);
size = 0xdeadbeef;
hr = IVectorView_Gamepad_get_Size(gamepads, &size);
- ok(hr == S_OK, "IVectorView_Gamepad_get_Size failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_Gamepad_get_Size failed, hr %#lx\n", hr);
ok(size != 0xdeadbeef, "IVectorView_Gamepad_get_Size returned %u\n", size);
gamepad = (IGamepad *)0xdeadbeef;
hr = IVectorView_Gamepad_GetAt(gamepads, size, &gamepad);
- ok(hr == E_BOUNDS, "IVectorView_Gamepad_GetAt failed, hr %#x\n", hr);
+ ok(hr == E_BOUNDS, "IVectorView_Gamepad_GetAt failed, hr %#lx\n", hr);
ok(gamepad == NULL, "IVectorView_Gamepad_GetAt returned %p\n", gamepad);
hr = IVectorView_Gamepad_GetMany(gamepads, size, 1, &gamepad, &size);
- ok(hr == E_BOUNDS, "IVectorView_Gamepad_GetMany failed, hr %#x\n", hr);
+ ok(hr == E_BOUNDS, "IVectorView_Gamepad_GetMany failed, hr %#lx\n", hr);
ok(size == 0, "IVectorView_Gamepad_GetMany returned count %u\n", size);
size = 0xdeadbeef;
found = TRUE;
gamepad = (IGamepad *)0xdeadbeef;
hr = IVectorView_Gamepad_IndexOf(gamepads, gamepad, &size, &found);
- ok(hr == S_OK, "IVectorView_Gamepad_IndexOf failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_Gamepad_IndexOf failed, hr %#lx\n", hr);
ok(size == 0 && found == FALSE, "IVectorView_Gamepad_IndexOf returned size %d, found %d\n", size, found);
IVectorView_Gamepad_Release(gamepads);
token.value = 0xdeadbeef;
hr = IGamepadStatics_add_GamepadAdded(gamepad_statics, &gamepad_event_handler.IEventHandler_Gamepad_iface, &token);
- ok(hr == S_OK, "IGamepadStatics_add_GamepadAdded failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IGamepadStatics_add_GamepadAdded failed, hr %#lx\n", hr);
ok(token.value != 0xdeadbeef, "IGamepadStatics_add_GamepadAdded returned token %#I64x\n", token.value);
hr = IGamepadStatics_remove_GamepadAdded(gamepad_statics, token);
- ok(hr == S_OK, "IGamepadStatics_add_GamepadAdded failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IGamepadStatics_add_GamepadAdded failed, hr %#lx\n", hr);
token.value = 0xdeadbeef;
hr = IGamepadStatics_add_GamepadRemoved(gamepad_statics, &gamepad_event_handler.IEventHandler_Gamepad_iface, &token);
- ok(hr == S_OK, "IGamepadStatics_add_GamepadRemoved failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IGamepadStatics_add_GamepadRemoved failed, hr %#lx\n", hr);
ok(token.value != 0xdeadbeef, "IGamepadStatics_add_GamepadRemoved returned token %#I64x\n", token.value);
hr = IGamepadStatics_remove_GamepadRemoved(gamepad_statics, token);
- ok(hr == S_OK, "IGamepadStatics_add_GamepadAdded failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IGamepadStatics_add_GamepadAdded failed, hr %#lx\n", hr);
hr = IGamepadStatics_add_GamepadAdded(gamepad_statics, NULL, &token);
- ok(hr == E_INVALIDARG, "IGamepadStatics_add_GamepadAdded failed, hr %#x\n", hr);
+ ok(hr == E_INVALIDARG, "IGamepadStatics_add_GamepadAdded failed, hr %#lx\n", hr);
IGamepadStatics_Release(gamepad_statics);
@@ -290,13 +290,13 @@ static void test_RawGameController(void)
controller_event_handler.IEventHandler_RawGameController_iface.lpVtbl = &controller_event_handler_vtbl;
hr = RoInitialize(RO_INIT_MULTITHREADED);
- ok(hr == S_OK || hr == S_FALSE, "RoInitialize failed, hr %#x\n", hr);
+ ok(hr == S_OK || hr == S_FALSE, "RoInitialize failed, hr %#lx\n", hr);
hr = WindowsCreateString(controller_name, wcslen(controller_name), &str);
- ok(hr == S_OK, "WindowsCreateString failed, hr %#x\n", hr);
+ ok(hr == S_OK, "WindowsCreateString failed, hr %#lx\n", hr);
hr = RoGetActivationFactory(str, &IID_IActivationFactory, (void **)&factory);
- ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "RoGetActivationFactory failed, hr %#x\n", hr);
+ ok(hr == S_OK || broken(hr == REGDB_E_CLASSNOTREG), "RoGetActivationFactory failed, hr %#lx\n", hr);
if (hr == REGDB_E_CLASSNOTREG)
{
win_skip("%s runtimeclass not registered, skipping tests.\n", wine_dbgstr_w(controller_name));
@@ -304,78 +304,78 @@ static void test_RawGameController(void)
}
hr = IActivationFactory_QueryInterface(factory, &IID_IInspectable, (void **)&inspectable);
- ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IInspectable failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IInspectable failed, hr %#lx\n", hr);
hr = IActivationFactory_QueryInterface(factory, &IID_IAgileObject, (void **)&agile_object);
- ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#lx\n", hr);
hr = IActivationFactory_QueryInterface(factory, &IID_IRawGameControllerStatics, (void **)&controller_statics);
- ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IRawGameControllerStatics failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IActivationFactory_QueryInterface IID_IRawGameControllerStatics failed, hr %#lx\n", hr);
hr = IRawGameControllerStatics_QueryInterface(controller_statics, &IID_IInspectable, (void **)&tmp_inspectable);
- ok(hr == S_OK, "IRawGameControllerStatics_QueryInterface IID_IInspectable failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IRawGameControllerStatics_QueryInterface IID_IInspectable failed, hr %#lx\n", hr);
ok(tmp_inspectable == inspectable, "IRawGameControllerStatics_QueryInterface IID_IInspectable returned %p, expected %p\n", tmp_inspectable, inspectable);
IInspectable_Release(tmp_inspectable);
hr = IRawGameControllerStatics_QueryInterface(controller_statics, &IID_IAgileObject, (void **)&tmp_agile_object);
- ok(hr == S_OK, "IRawGameControllerStatics_QueryInterface IID_IAgileObject failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IRawGameControllerStatics_QueryInterface IID_IAgileObject failed, hr %#lx\n", hr);
ok(tmp_agile_object == agile_object, "IRawGameControllerStatics_QueryInterface IID_IAgileObject returned %p, expected %p\n", tmp_agile_object, agile_object);
IAgileObject_Release(tmp_agile_object);
hr = IRawGameControllerStatics_get_RawGameControllers(controller_statics, &controllers);
- ok(hr == S_OK, "IRawGameControllerStatics_get_RawGameControllers failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IRawGameControllerStatics_get_RawGameControllers failed, hr %#lx\n", hr);
hr = IVectorView_RawGameController_QueryInterface(controllers, &IID_IInspectable, (void **)&tmp_inspectable);
- ok(hr == S_OK, "IVectorView_RawGameController_QueryInterface failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_RawGameController_QueryInterface failed, hr %#lx\n", hr);
ok(tmp_inspectable != inspectable, "IVectorView_RawGameController_QueryInterface returned %p, expected %p\n", tmp_inspectable, inspectable);
IInspectable_Release(tmp_inspectable);
hr = IVectorView_RawGameController_QueryInterface(controllers, &IID_IAgileObject, (void **)&tmp_agile_object);
- ok(hr == S_OK, "IVectorView_RawGameController_QueryInterface failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_RawGameController_QueryInterface failed, hr %#lx\n", hr);
ok(tmp_agile_object != agile_object, "IVectorView_RawGameController_QueryInterface IID_IAgileObject returned agile_object\n");
IAgileObject_Release(tmp_agile_object);
size = 0xdeadbeef;
hr = IVectorView_RawGameController_get_Size(controllers, &size);
- ok(hr == S_OK, "IVectorView_RawGameController_get_Size failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_RawGameController_get_Size failed, hr %#lx\n", hr);
ok(size != 0xdeadbeef, "IVectorView_RawGameController_get_Size returned %u\n", size);
hr = IVectorView_RawGameController_GetMany(controllers, size, 1, &controller, &size);
- ok(hr == E_BOUNDS, "IVectorView_RawGameController_GetMany failed, hr %#x\n", hr);
+ ok(hr == E_BOUNDS, "IVectorView_RawGameController_GetMany failed, hr %#lx\n", hr);
ok(size == 0, "IVectorView_RawGameController_GetMany returned count %u\n", size);
controller = (IRawGameController *)0xdeadbeef;
hr = IVectorView_RawGameController_GetAt(controllers, size, &controller);
- ok(hr == E_BOUNDS, "IVectorView_RawGameController_GetAt failed, hr %#x\n", hr);
+ ok(hr == E_BOUNDS, "IVectorView_RawGameController_GetAt failed, hr %#lx\n", hr);
ok(controller == NULL, "IVectorView_RawGameController_GetAt returned %p\n", controller);
size = 0xdeadbeef;
found = TRUE;
controller = (IRawGameController *)0xdeadbeef;
hr = IVectorView_RawGameController_IndexOf(controllers, controller, &size, &found);
- ok(hr == S_OK, "IVectorView_RawGameController_IndexOf failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IVectorView_RawGameController_IndexOf failed, hr %#lx\n", hr);
ok(size == 0 && found == FALSE, "IVectorView_RawGameController_IndexOf returned size %d, found %d\n", size, found);
IVectorView_RawGameController_Release(controllers);
token.value = 0xdeadbeef;
hr = IRawGameControllerStatics_add_RawGameControllerAdded(controller_statics, &controller_event_handler.IEventHandler_RawGameController_iface, &token);
- ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerAdded failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerAdded failed, hr %#lx\n", hr);
ok(token.value != 0xdeadbeef, "IRawGameControllerStatics_add_RawGameControllerAdded returned token %#I64x\n", token.value);
hr = IRawGameControllerStatics_remove_RawGameControllerAdded(controller_statics, token);
- ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerAdded failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerAdded failed, hr %#lx\n", hr);
token.value = 0xdeadbeef;
hr = IRawGameControllerStatics_add_RawGameControllerRemoved(controller_statics, &controller_event_handler.IEventHandler_RawGameController_iface, &token);
- ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerRemoved failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerRemoved failed, hr %#lx\n", hr);
ok(token.value != 0xdeadbeef, "IRawGameControllerStatics_add_RawGameControllerRemoved returned token %#I64x\n", token.value);
hr = IRawGameControllerStatics_remove_RawGameControllerRemoved(controller_statics, token);
- ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerAdded failed, hr %#x\n", hr);
+ ok(hr == S_OK, "IRawGameControllerStatics_add_RawGameControllerAdded failed, hr %#lx\n", hr);
hr = IRawGameControllerStatics_add_RawGameControllerAdded(controller_statics, NULL, &token);
- ok(hr == E_INVALIDARG, "IRawGameControllerStatics_add_RawGameControllerAdded failed, hr %#x\n", hr);
+ ok(hr == E_INVALIDARG, "IRawGameControllerStatics_add_RawGameControllerAdded failed, hr %#lx\n", hr);
IRawGameControllerStatics_Release(controller_statics);
--
2.34.1
1
4