diff options
Diffstat (limited to 'avstream/avscamera/mft0')
| -rw-r--r-- | avstream/avscamera/mft0/MFT0Impl.cpp | 4 | ||||
| -rw-r--r-- | avstream/avscamera/mft0/stdafx.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/avstream/avscamera/mft0/MFT0Impl.cpp b/avstream/avscamera/mft0/MFT0Impl.cpp index 992be0e9..26d40f99 100644 --- a/avstream/avscamera/mft0/MFT0Impl.cpp +++ b/avstream/avscamera/mft0/MFT0Impl.cpp @@ -1950,14 +1950,14 @@ HRESULT CSocMft0::ParseMetadata_FaceDetection( } PMETADATA_FACEDATA pFaceData = (PMETADATA_FACEDATA)(pFaceHeader + 1); UINT32 cbRectSize = sizeof(FaceRectInfoBlobHeader) + (sizeof(FaceRectInfo) * (pFaceHeader->Count)); - BYTE *pRectBuf = new BYTE[cbRectSize]; + BYTE *pRectBuf = new (std::nothrow) BYTE[cbRectSize]; if (pRectBuf == NULL) { return E_OUTOFMEMORY; } UINT32 cbCharSize = sizeof(FaceCharacterizationBlobHeader) + (sizeof(FaceCharacterization) * (pFaceHeader->Count)); - BYTE *pCharBuf = new BYTE[cbCharSize]; + BYTE *pCharBuf = new (std::nothrow) BYTE[cbCharSize]; if (pCharBuf == NULL) { delete[] pRectBuf; diff --git a/avstream/avscamera/mft0/stdafx.h b/avstream/avscamera/mft0/stdafx.h index 037376ec..6d784805 100644 --- a/avstream/avscamera/mft0/stdafx.h +++ b/avstream/avscamera/mft0/stdafx.h @@ -16,7 +16,12 @@ #endif #include "targetver.h" +#if (NTDDI_VERSION >= NTDDI_WIN10_VB) +#pragma message("MFT0 is deprecated for this target Windows version and beyond- Change project settings to target an older version of Windows") +#endif + #if (NTDDI_VERSION <= NTDDI_WIN7) +// TODO: disable the MFT0 conditional to the target system version #pragma message("MFT0 is in not supported in this target Windows version - Change project settings to target a newer version of Windows") #endif |
