diff --git a/saco/d3d9/common/DXUTmisc.cpp b/saco/d3d9/common/DXUTmisc.cpp
index bf13100..2cea656 100644
--- a/saco/d3d9/common/DXUTmisc.cpp
+++ b/saco/d3d9/common/DXUTmisc.cpp
@@ -190,3 +190,26 @@ LPCTSTR DXUTGetMediaSearchPath()
 }
 
 
+//--------------------------------------------------------------------------------------
+HRESULT DXUTSetMediaSearchPath( LPCTSTR strPath )
+{
+    HRESULT hr;
+
+    TCHAR* s_strSearchPath = DXUTMediaSearchPath();
+
+    hr = StringCchCopy( s_strSearchPath, MAX_PATH, strPath );   
+    if( SUCCEEDED(hr) )
+    {
+        // append slash if needed
+        size_t ch;
+        hr = StringCchLength( s_strSearchPath, MAX_PATH, &ch );
+        if( SUCCEEDED(hr) && s_strSearchPath[ch-1] != L'\\')
+        {
+            hr = StringCchCat( s_strSearchPath, MAX_PATH, "\\" );
+        }
+    }
+
+    return hr;
+}
+
+
diff --git a/saco/d3d9/common/dxstdafx.h b/saco/d3d9/common/dxstdafx.h
index ccfd00d..569d3f9 100644
--- a/saco/d3d9/common/dxstdafx.h
+++ b/saco/d3d9/common/dxstdafx.h
@@ -21,6 +21,10 @@
 #include <stdio.h>
 #include <multimon.h> 
 
+
+#define STRSAFE_NO_DEPRECATE
+#include <strsafe.h>
+
 #include "DXUTmisc.h"
 
 #endif // !defined(DXSDK_STDAFX_H)