I've racked my brain over this for some hours: pClient is always NULL (0x000000). pClient doesn't seem to initialize the same way as ISkypePtr, IUserCollectionPtr, and 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);
}
}