From 43cec2d41c7ac8133528d09822fcc98d34c9d00a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Mon, 26 Oct 2015 22:30:44 +0000 Subject: [PATCH] [COMSUPP]: Use "operator new" and "operator delete" in order to avoid strange linkage problems (like "operator delete[]" not found, etc...) while being compatible with MS version of comsupp.lib. svn path=/trunk/; revision=69715 --- reactos/lib/sdk/comsupp/comsupp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/lib/sdk/comsupp/comsupp.cpp b/reactos/lib/sdk/comsupp/comsupp.cpp index 676b53d2e5c..05152224502 100644 --- a/reactos/lib/sdk/comsupp/comsupp.cpp +++ b/reactos/lib/sdk/comsupp/comsupp.cpp @@ -109,7 +109,7 @@ char* WINAPI ConvertBSTRToString(BSTR pSrc) } /* Allocate the string */ - szOut = new char[cb]; + szOut = (char*)::operator new(cb * sizeof(char)); if (!szOut) { ::_com_issue_error(HRESULT_FROM_WIN32(ERROR_OUTOFMEMORY)); @@ -123,7 +123,7 @@ char* WINAPI ConvertBSTRToString(BSTR pSrc) /* We failed, clean everything up */ cwch = ::GetLastError(); - delete[] szOut; + ::operator delete(szOut); szOut = NULL; ::_com_issue_error(!IS_ERROR(cwch) ? HRESULT_FROM_WIN32(cwch) : cwch);