Re: About RTC Client's function Get_NetworkAddress
Well the first problem is that the method is actually get_NetworkAddresses.
The second problem is that the last parameter to the method is the address
of an actual VARIANT. My guess is that -- since the sizeof your array
exceeds the sizeeof a VARIANT, the information probably does get written to
it as a (VT_BSTR|VT_ARRAY). Presuming a success return code. The third
problem is that you never seem to check return codes at all. The fourth
problem is that IRTCSessionChangeEvent::get_State takes the address of an
RTC_SESSION_STATE.
--
Jeff Partch [VC++ MVP]
"Joe Jia" <joejia20@hotmail.com> wrote in message
news:%23h5RPDp0GHA.4016@TK2MSFTNGP02.phx.gbl...
its code is followed:
IRTCClient *m_Client ;
void CMyDlg::OnRTCSessionStatechangeEvent(IRTCSessionChangeEvent* pEvent)
{
BSTR bstrIP[20] ;
IRTCSession*pSession=NULL ;
RTC_SESSION_STATE enState ;
pEvent->get_State(enState) ;
switch(enState)
{
case RTCSS_INCOMING:
m_Client->get_NetworkAddress(VARIANT_TRUE,VARIANT_TRUE,(VARIANT*)bstrIP) ;
//
m_Client->get_NetworkAddress(VARIANT_TRUE,VARIANT_FALSE,(VARIANT*)bstrIP)
;
//
m_Client->get_NetworkAddress(VARIANT_FALSE,VARIANT_TRUE,(VARIANT*)bstrIP)
;
//
m_Client->get_NetworkAddress(VARIANT_FALSE,VARIANT_FALSE,(VARIANT*)bstrIP)
;
}
}
I saw the MSDN' comment and tried differant combination of first two
parameter .
but I can not get IP .Why?
"Jeff Partch" <jeffp@mvps.org> ?;#XN
news:uKm19zf0GHA.1568@TK2MSFTNGP03.phx.gbl...
"Joe Jia" <joejia20@hotmail.com> wrote in message
news:%23DC6TAe0GHA.5100@TK2MSFTNGP05.phx.gbl...
hi:
I can not get address by calling get_networkadress of RTC Client
thanks in advance
So can you post your code and the HRESULTs you get along the way?
--
Jeff Partch [VC++ MVP]