Changeset 2286


Ignore:
Timestamp:
Sep 16, 2008 5:02:48 PM (16 years ago)
Author:
nanang
Message:

Ticket #625: Fixed unicode build issues on Windows platforms (thanks David Parker for the patch).

Location:
pjproject/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/dsound.c

    r2039 r2286  
    597597 
    598598/* DirectSound enum device callback */ 
    599 static BOOL CALLBACK DSEnumCallback( LPGUID lpGuid, LPCSTR lpcstrDescription,   
    600                                      LPCSTR lpcstrModule, LPVOID lpContext) 
     599static BOOL CALLBACK DSEnumCallback( LPGUID lpGuid, LPCTSTR lpcstrDescription,   
     600                                     LPCTSTR lpcstrModule, LPVOID lpContext) 
    601601{ 
    602602    unsigned index, max = sizeof(dev_info[index].info.name); 
     
    627627    } 
    628628 
     629#ifdef UNICODE 
     630    WideCharToMultiByte(CP_ACP, 0, lpcstrDescription, wcslen(lpcstrDescription), dev_info[index].info.name, max, NULL, NULL); 
     631#else 
    629632    strncpy(dev_info[index].info.name, lpcstrDescription, max); 
     633#endif 
     634 
    630635    dev_info[index].info.name[max-1] = '\0'; 
    631636    if (lpGuid == NULL) { 
  • pjproject/trunk/pjsip/src/test-pjsip/msg_test.c

    r2039 r2286  
    126126    enum { BUFLEN = 512 }; 
    127127 
    128     entry->len = pj_native_strlen(entry->msg); 
     128    entry->len = pj_ansi_strlen(entry->msg); 
    129129 
    130130    if (var.flag & FLAG_PARSE_ONLY) 
     
    673673        "m=audio 3456 RTP/AVP 0 1 3 99\r\n" 
    674674        "a=rtpmap:0 PCMU/8000\r\n"; 
    675     body->len = pj_native_strlen((const char*) body->data); 
     675    body->len = pj_ansi_strlen((const char*) body->data); 
    676676    body->print_body = &pjsip_print_text_body; 
    677677 
  • pjproject/trunk/pjsip/src/test-pjsip/transport_test.c

    r2188 r2286  
    543543 
    544544    /* Initialize static test data. */ 
    545     pj_native_strcpy(rt_target_uri, target_url); 
     545    pj_ansi_strcpy(rt_target_uri, target_url); 
    546546    rt_call_id = pj_str("RT-Call-Id/"); 
    547547    rt_stop = PJ_FALSE; 
Note: See TracChangeset for help on using the changeset viewer.