diff --git a/WICTextureLoader/WICTextureLoader.cpp b/WICTextureLoader/WICTextureLoader.cpp index 1118c77..fbd99d2 100644 --- a/WICTextureLoader/WICTextureLoader.cpp +++ b/WICTextureLoader/WICTextureLoader.cpp @@ -526,7 +526,7 @@ static HRESULT CreateTextureFromWIC( _In_ ID3D11Device* d3dDevice, } else { -#if defined(DEBUG) || defined(PROFILE) +#if defined(_DEBUG) || defined(PROFILE) tex->SetPrivateData( WKPDID_D3DDebugObjectName, sizeof("WICTextureLoader")-1, "WICTextureLoader" @@ -593,7 +593,7 @@ HRESULT CreateWICTextureFromMemory( _In_ ID3D11Device* d3dDevice, if ( FAILED(hr)) return hr; -#if defined(DEBUG) || defined(PROFILE) +#if defined(_DEBUG) || defined(PROFILE) if (texture != 0 && *texture != 0) { (*texture)->SetPrivateData( WKPDID_D3DDebugObjectName, @@ -646,7 +646,7 @@ HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice, if ( FAILED(hr)) return hr; -#if defined(DEBUG) || defined(PROFILE) +#if defined(_DEBUG) || defined(PROFILE) if (texture != 0 || textureView != 0) { CHAR strFileA[MAX_PATH]; @@ -672,7 +672,7 @@ HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice, if (texture != 0 && *texture != 0) { (*texture)->SetPrivateData( WKPDID_D3DDebugObjectName, - lstrlenA(pstrName), + static_cast( strnlen_s(pstrName, MAX_PATH) ), pstrName ); } @@ -680,7 +680,7 @@ HRESULT CreateWICTextureFromFile( _In_ ID3D11Device* d3dDevice, if (textureView != 0 && *textureView != 0 ) { (*textureView)->SetPrivateData( WKPDID_D3DDebugObjectName, - lstrlenA(pstrName), + static_cast( strnlen_s(pstrName, MAX_PATH) ), pstrName ); }