Author: hbelusca Date: Mon Oct 26 22:30:44 2015 New Revision: 69715
URL: http://svn.reactos.org/svn/reactos?rev=69715&view=rev Log: [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.
Modified: trunk/reactos/lib/sdk/comsupp/comsupp.cpp
Modified: trunk/reactos/lib/sdk/comsupp/comsupp.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/sdk/comsupp/comsupp.cpp... ============================================================================== --- trunk/reactos/lib/sdk/comsupp/comsupp.cpp [iso-8859-1] (original) +++ trunk/reactos/lib/sdk/comsupp/comsupp.cpp [iso-8859-1] Mon Oct 26 22:30:44 2015 @@ -109,7 +109,7 @@ }
/* 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 @@ /* 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);