我已经为此绞尽脑汁了几个小时:pClient 始终为 NULL (0x000000)。pClient 的初始化方式似乎与 ISkypePtr、IUserCollectionPtr 和 IUserPtr 不同?
ISkypePtr pSkype(__uuidof(Skype));
while (TRUE){
IUserCollectionPtr pResults = pSkype->SearchForUsers("john doe");
for (int i = 1; i <= pResults->Count; ++i){
IUserPtr pUser = pResults->GetItem(i); _bstr_t handle = pUser->GetHandle();
IClientPtr pClient;
pClient->OpenAddContactDialog(handle);
Sleep(30000);
}
}