mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 22:12:46 +00:00
[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
This commit is contained in:
parent
6b82bc960e
commit
43cec2d41c
1 changed files with 2 additions and 2 deletions
|
@ -109,7 +109,7 @@ char* WINAPI ConvertBSTRToString(BSTR pSrc)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate the string */
|
/* Allocate the string */
|
||||||
szOut = new char[cb];
|
szOut = (char*)::operator new(cb * sizeof(char));
|
||||||
if (!szOut)
|
if (!szOut)
|
||||||
{
|
{
|
||||||
::_com_issue_error(HRESULT_FROM_WIN32(ERROR_OUTOFMEMORY));
|
::_com_issue_error(HRESULT_FROM_WIN32(ERROR_OUTOFMEMORY));
|
||||||
|
@ -123,7 +123,7 @@ char* WINAPI ConvertBSTRToString(BSTR pSrc)
|
||||||
/* We failed, clean everything up */
|
/* We failed, clean everything up */
|
||||||
cwch = ::GetLastError();
|
cwch = ::GetLastError();
|
||||||
|
|
||||||
delete[] szOut;
|
::operator delete(szOut);
|
||||||
szOut = NULL;
|
szOut = NULL;
|
||||||
|
|
||||||
::_com_issue_error(!IS_ERROR(cwch) ? HRESULT_FROM_WIN32(cwch) : cwch);
|
::_com_issue_error(!IS_ERROR(cwch) ? HRESULT_FROM_WIN32(cwch) : cwch);
|
||||||
|
|
Loading…
Reference in a new issue