Ah, I omitted the argument checking for brevity...
"Alexander Nickolov" <agnickolov@mvps.org> wrote in message
news:OfsdEi$kGHA.896@TK2MSFTNGP04.phx.gbl
Well, sorry, should have used SysAllocStringLen, I agree.
Though it does check and returns E_OUTOFMEMORY if the
input is not NULL.
It checks for val being NULL. It doesn't check for ret being NULL,
but immediately dereferences it as *ret. It is customary to return
E_POINTER when an [out] parameter's pointer is NULL.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going
to land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925