I guess the "&pj_str()" is the problem, try this: -- pj_str_t wavfile_st; pjsua_player_create(pj_cstr(&wavfile_st, "C:\\1.wav"), 0, &player_id); -- BR, nanang On Fri, Jan 15, 2010 at 2:35 PM, raksa chao <chao.raksa at gmail.com> wrote: > Hi the below is the code: > > > #include > > <pjsua-lib/pjsua.h> > > //#include <stdio.h> > > #ifdef > > PJSIPDLL_EXPORTS > > #define PJSIPDLL_DLL_API __declspec(dllexport) > > #else > > #define PJSIPDLL_DLL_API __declspec(dllimport) > > #endif > > extern > > "C" PJSIPDLL_DLL_API int stream_to_call(char* fileName,int callID); > > #define > > THIS_FILE "pjsipDll_playWav.cpp" > > #define > > NO_LIMIT (int)0x7FFFFFFF > > PJSIPDLL_DLL_API pj_status_t stream_to_call( > > char* wavFile, pjsua_call_id call_id ) > > { > > pj_status_t status; > > pjsua_player_id player_id; > > //pj_status_t status = pjsua_player_create(wavFile , PJMEDIA_FILE_NO_LOOP, > &player_id); > > status = pjsua_player_create(&pj_str( > > "C:\\1.wav"), 0, &player_id); > > if (status != PJ_SUCCESS) > > return status; > > status = pjsua_conf_connect( pjsua_player_get_conf_port (player_id), > pjsua_call_get_conf_port(call_id)); > > } > > What wrong help me please?. It works properly in pjsua sample when i test > it, but it is not work when i build .dll can call it to use in c#. > > > > Thanks,, > > Raksa,, > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > >