@@ -24,7 +24,6 @@ subject to the following restrictions:
24
24
#include " SpuNarrowPhaseCollisionTask/SpuGatheringCollisionTask.h"
25
25
26
26
#ifdef WINRT
27
- #include < atlstr.h>
28
27
#define InitializeCriticalSection (arg0 ) InitializeCriticalSectionEx(arg0, 0 , 0 )
29
28
#define WaitForSingleObject (arg0, arg1 ) WaitForSingleObjectEx(arg0, arg1, false );
30
29
#define WaitForMultipleObjects (arg0, arg1, arg2, arg3 ) WaitForMultipleObjectsEx(arg0, arg1, arg2, arg3, false );
@@ -253,14 +252,17 @@ void Win32ThreadSupport::startThreads(const Win32ThreadConstructionInfo& threadC
253
252
254
253
sprintf (spuStatus.m_eventStartHandleName ," eventStart%s%d" ,threadConstructionInfo.m_uniqueName ,i);
255
254
#ifdef WINRT
256
- spuStatus.m_eventStartHandle = CreateEventEx (NULL , CString (spuStatus.m_eventStartHandleName ), 0 , EVENT_ALL_ACCESS);
255
+ WCHAR wszBuf[MAX_PATH] = { 0 };
256
+ MultiByteToWideChar (CP_UTF8, 0 , spuStatus.m_eventStartHandleName , -1 , wszBuf, sizeof (wszBuf));
257
+ spuStatus.m_eventStartHandle = CreateEventEx (NULL , wszBuf, 0 , EVENT_ALL_ACCESS);
257
258
#else
258
259
spuStatus.m_eventStartHandle = CreateEventA (0 ,false ,false ,spuStatus.m_eventStartHandleName );
259
260
#endif
260
261
261
262
sprintf (spuStatus.m_eventCompletetHandleName ," eventComplete%s%d" ,threadConstructionInfo.m_uniqueName ,i);
262
263
#ifdef WINRT
263
- spuStatus.m_eventCompletetHandle = CreateEventEx (NULL , CString (spuStatus.m_eventStartHandleName ), 0 , EVENT_ALL_ACCESS);
264
+ MultiByteToWideChar (CP_UTF8, 0 , spuStatus.m_eventCompletetHandleName , -1 , wszBuf, sizeof (wszBuf));
265
+ spuStatus.m_eventCompletetHandle = CreateEventEx (NULL , wszBuf, 0 , EVENT_ALL_ACCESS);
264
266
#else
265
267
spuStatus.m_eventCompletetHandle = CreateEventA (0 ,false ,false ,spuStatus.m_eventCompletetHandleName );
266
268
#endif
0 commit comments