To convert unsigned char to unsigned short in VC++
I have a method in VC++ that receives for parameter a type unsigned char
(variable num).
Inside this method I need to load this value in a pointer of type unsigned
short.
As I make to convert it?
void CMvoipCtrl::Call(unsigned char num)
{
CConferenceManager o_CMgr;
o_CMgr.CreateCall (num,NULL);
Quote:
}
-----------------------------------------------
HRESULT CConferenceManager::CreateCall
(
BSTR bstrHostAddress,
INmConference* pINmConference
)
{
if (m_pINmManager == NULL || pINmConference == NULL)
return E_FAIL;
INmCall* pINmCall = NULL;
HRESULT hr = m_pINmManager->CreateCall(&pINmCall, NM_CALL_DEFAULT,
NM_ADDR_IP, bstrHostAddress,
pINmConference);
return hr;
Quote:
}
The parameter bstrHostAddress is indirectly a pointer to a type of data
unsigned short.
BSTR bstrHostAddress;
typedef OLECHAR* BSTR;
typedef WCHAR OLECHAR;
typedef wchar_t WCHAR;
typedef unsigned short wchar_t;
-----------------------------------------------
Thanks and Best Regards.
-----------------------------------------------
Sebastian Piccolotto