Index: pjproject/trunk/pjmedia/src/pjmedia/portaudio/pa_win_wmme.c
===================================================================
--- pjproject/trunk/pjmedia/src/pjmedia/portaudio/pa_win_wmme.c	(revision 65)
+++ pjproject/trunk/pjmedia/src/pjmedia/portaudio/pa_win_wmme.c	(revision 183)
@@ -106,5 +106,7 @@
 #include <windows.h>
 #include <mmsystem.h>
+#ifndef UNDER_CE
 #include <process.h>
+#endif
 #include <assert.h>
 /* PLB20010422 - "memory.h" doesn't work on CodeWarrior for PC. Thanks Mike Berry for the mod. */
@@ -125,5 +127,10 @@
 #include "pa_win_wmme.h"
 
-#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */
+#include <pj/string.h>
+#include <pj/unicode.h>
+
+#if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && \
+    !defined(UNDER_CE)
+/* MSC version 6 and above */
 #pragma comment(lib, "winmm.lib")
 #endif
@@ -160,6 +167,6 @@
 #define PA_MME_MIN_TIMEOUT_MSEC_        (1000)
 
-static const char constInputMapperSuffix_[] = " - Input";
-static const char constOutputMapperSuffix_[] = " - Output";
+static const pj_char_t constInputMapperSuffix_[] = PJ_T(" - Input");
+static const pj_char_t constOutputMapperSuffix_[] = PJ_T(" - Output");
 
 /********************************************************************/
@@ -553,4 +560,5 @@
     WAVEINCAPS wic;
     PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;
+    PJ_DECL_ANSI_TEMP_BUF(abuf,128)
     
     *success = 0;
@@ -575,6 +583,7 @@
     {
         /* Append I/O suffix to WAVE_MAPPER device. */
-        deviceName = (char *)PaUtil_GroupAllocateMemory(
-                    winMmeHostApi->allocations, strlen( wic.szPname ) + 1 + sizeof(constInputMapperSuffix_) );
+        deviceName = (char*)PaUtil_GroupAllocateMemory(
+                    winMmeHostApi->allocations, 
+		    pj_native_strlen( wic.szPname ) + sizeof(pj_char_t) + sizeof(constInputMapperSuffix_) );
         if( !deviceName )
         {
@@ -582,11 +591,11 @@
             goto error;
         }
-        strcpy( deviceName, wic.szPname );
-        strcat( deviceName, constInputMapperSuffix_ );
+        strcpy( deviceName, PJ_NATIVE_TO_STRING(wic.szPname,abuf,sizeof(abuf)) );
+        strcat( deviceName, PJ_NATIVE_TO_STRING(constInputMapperSuffix_,abuf,sizeof(abuf)) );
     }
     else
     {
         deviceName = (char*)PaUtil_GroupAllocateMemory(
-                    winMmeHostApi->allocations, strlen( wic.szPname ) + 1 );
+                    winMmeHostApi->allocations, pj_native_strlen( wic.szPname ) + sizeof(pj_char_t) );
         if( !deviceName )
         {
@@ -594,5 +603,5 @@
             goto error;
         }
-        strcpy( deviceName, wic.szPname  );
+        strcpy( deviceName, PJ_NATIVE_TO_STRING(wic.szPname,abuf,sizeof(abuf))  );
     }
     deviceInfo->name = deviceName;
@@ -629,4 +638,5 @@
     WAVEOUTCAPS woc;
     PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo;
+    PJ_DECL_ANSI_TEMP_BUF(abuf,128)
     
     *success = 0;
@@ -652,5 +662,5 @@
         /* Append I/O suffix to WAVE_MAPPER device. */
         deviceName = (char *)PaUtil_GroupAllocateMemory(
-                    winMmeHostApi->allocations, strlen( woc.szPname ) + 1 + sizeof(constOutputMapperSuffix_) );
+                    winMmeHostApi->allocations, pj_native_strlen( woc.szPname ) + 1 + sizeof(constOutputMapperSuffix_) );
         if( !deviceName )
         {
@@ -658,11 +668,11 @@
             goto error;
         }
-        strcpy( deviceName, woc.szPname );
-        strcat( deviceName, constOutputMapperSuffix_ );
+        strcpy( deviceName, PJ_NATIVE_TO_STRING(woc.szPname,abuf,sizeof(abuf)) );
+        strcat( deviceName, PJ_NATIVE_TO_STRING(constOutputMapperSuffix_,abuf,sizeof(abuf)) );
     }
     else
     {
         deviceName = (char*)PaUtil_GroupAllocateMemory(
-                    winMmeHostApi->allocations, strlen( woc.szPname ) + 1 );
+                    winMmeHostApi->allocations, pj_native_strlen( woc.szPname ) + 1 );
         if( !deviceName )
         {
@@ -670,5 +680,5 @@
             goto error;
         }
-        strcpy( deviceName, woc.szPname  );
+        strcpy( deviceName, PJ_NATIVE_TO_STRING(woc.szPname,abuf,sizeof(abuf))  );
     }
     deviceInfo->name = deviceName;
