E
Evan Camilleri
I found http://www.developer.com/ws/pc/article.php/3583686 where there is a
SIP enumeration! I would like it in C#... any help?
Basically the following is what is stopping me:
CTypedPtrMap<CMapStringToPtr,CString,CLSID*> g_SipMap;
int SipEnumIMProc(IMENUMINFO *pIMInfo)
{
CLSID* pCLSID = new CLSID;
memcpy(pCLSID,&pIMInfo->clsid,sizeof(CLSID));
g_SipMap.SetAt(CString(pIMInfo->szName),pCLSID);
TRACE(_T("%sn"),CString(pIMInfo->szName));
return 1;
}
void CSIPDemoDlg::OnButtonEnum()
{
SipEnumIM(SipEnumIMProc);
CString sSipName;
CLSID *pCLSID = NULL;
for (POSITION pos = g_SipMap.GetStartPosition(); pos; )
{
g_SipMap.GetNextAssoc(pos,sSipName,pCLSID);
m_SipList.AddString(sSipName);
}
}
Do not know if correct, I made the following definition in
c#:[DllImport("Coredll.dll")]static extern int SipEnumIM(IMENUMPROC
pEnumIMProc);struct IMENUMINFO{char[] szName;Guid clsid;}delegate int
IMENUMPROC(ref IMENUMINFO imenuinfo);Evan
SIP enumeration! I would like it in C#... any help?
Basically the following is what is stopping me:
CTypedPtrMap<CMapStringToPtr,CString,CLSID*> g_SipMap;
int SipEnumIMProc(IMENUMINFO *pIMInfo)
{
CLSID* pCLSID = new CLSID;
memcpy(pCLSID,&pIMInfo->clsid,sizeof(CLSID));
g_SipMap.SetAt(CString(pIMInfo->szName),pCLSID);
TRACE(_T("%sn"),CString(pIMInfo->szName));
return 1;
}
void CSIPDemoDlg::OnButtonEnum()
{
SipEnumIM(SipEnumIMProc);
CString sSipName;
CLSID *pCLSID = NULL;
for (POSITION pos = g_SipMap.GetStartPosition(); pos; )
{
g_SipMap.GetNextAssoc(pos,sSipName,pCLSID);
m_SipList.AddString(sSipName);
}
}
Do not know if correct, I made the following definition in
c#:[DllImport("Coredll.dll")]static extern int SipEnumIM(IMENUMPROC
pEnumIMProc);struct IMENUMINFO{char[] szName;Guid clsid;}delegate int
IMENUMPROC(ref IMENUMINFO imenuinfo);Evan