Fix a bug in LoadNativeStringResource to honor the contract properly when the buffer...
authorYi Zhang (CLR) <yizhang82@users.noreply.github.com>
Fri, 2 Jun 2017 16:10:34 +0000 (09:10 -0700)
committerJan Vorlicek <janvorli@microsoft.com>
Fri, 2 Jun 2017 16:10:34 +0000 (18:10 +0200)
commit3a6895ebcc29e0ad84bef61a216433e99fda5f6c
tree3f208a02733279189334b651e69f930c4dc92f40
parentef4b192c83f7edd90c75d65ba5440327b3f9d276
Fix a bug in LoadNativeStringResource to honor the contract properly when the buffer is not big enough (#12051)

* Return last error properly

* adjust pcwchUsed if ERROR_INSUFFICIENT_BUFFER

* return hr

* ERROR_INSUFFICIENT_BUFFER is a win32 error....
src/nativeresources/resourcestring.cpp
src/utilcode/ccomprc.cpp
src/utilcode/sstring_com.cpp