Hamilton Fonte II wrote: > People, Hi... > > > > I?m working on a project to add some sipphone?s features to a .NET GUI > written in C#. I wrote a small wrapper with the needed features but I?m > running into a problem, I am unable to initialize the media stack. I > believe it has something to do with my wrapper?s implementation, with a > plain C example it works fine but with the wrapper I get the following > error: It could be because PortAudio tries to call CoInitialize() in pa_win_ds.c:776, which would fail if your wrapper has already called CoInitialize() before. This has been fixed in main PortAudio svn repository, but I haven't integrated this with pjsip. As a temporary fix, you can change like 777 to this: if( FAILED(hr) && hr != RPC_E_CHANGED_MODE ) return paUnanticipatedHostError; regards, -benny > > > 15:41:11.446 sip_endpoint.c Module "mod-pjsua-log" registered > > 15:41:11.446 sip_endpoint.c Module "mod-tsx-layer" registered > > 15:41:11.446 sip_endpoint.c Module "mod-stateful-util" registered > > 15:41:11.446 sip_endpoint.c Module "mod-ua" registered > > 15:41:11.446 sip_endpoint.c Module "mod-pjsua" registered > > 15:41:11.446 sip_endpoint.c Module "mod-invite" registered > > 15:41:11.570 pasound.c PA message: Pa_GetDeviceInfo: Num input > channels reported as 65535! Changed to 2. > > > > 15:41:11.570 pasound.c PA message: Pa_GetDeviceInfo: Num output > channels reported as 65535! Changed to 2. > > > > 15:41:11.570 pasound.c PortAudio sound library initialized, > status=-9999 > > 15:41:11.570 pasound.c PortAudio host api count=-10000 > > 15:41:11.570 pasound.c Sound device count=-10000 > > 15:41:11.570 pasound.c PortAudio sound library shutting down.. > > 15:41:11.570 pjsua_media.c Media stack initialization has returned > error: Unanticipated host error [status=259001] > > 15:41:11.570 pjsua_core.c Shutting down... > > 15:41:12.583 sip_endpoint.c Destroying endpoing instance.. > > 15:41:12.583 sip_endpoint.c Module "mod-pjsua" unregistered > > 15:41:12.583 sip_endpoint.c Module "mod-stateful-util" unregistered > > 15:41:12.583 sip_endpoint.c Module "mod-invite" unregistered > > 15:41:12.583 sip_endpoint.c Module "mod-ua" unregistered > > 15:41:12.583 sip_transactio Stopping transaction layer module > > 15:41:12.583 sip_transactio Transaction layer module destroyed > > 15:41:12.583 sip_endpoint.c Module "mod-tsx-layer" unregistered > > 15:41:12.583 sip_endpoint.c Module "mod-msg-print" unregistered > > 15:41:12.583 sip_endpoint.c Module "mod-pjsua-log" unregistered > > 15:41:12.583 sip_transport. Destroying transport manager > > 15:41:12.583 sip_endpoint.c Endpoint 003DAAE4 destroyed > > 15:41:12.583 pjsua_core.c PJSUA destroyed... > > > > > > Any ideas?!?!?! > > > > Regards... > > > > Hamilton > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 -- Benny Prijono http://www.pjsip.org