m4n71k0r

Untitled

Dec 28th, 2011
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     case IDM_LINK0: case IDM_LINK1: case IDM_LINK2: case IDM_LINK3: case IDM_LINK4:
  2.     case IDM_LINK5: case IDM_LINK6: case IDM_LINK7: case IDM_LINK8: case IDM_LINK9:
  3.     {
  4.         unsigned idx = IDM_LINK0;
  5.         for (TCHAR *p = _tcsstr(item->itemResource.statusMessage, _T("http://")); p && *p; p = _tcsstr(p+1, _T("http://")))
  6.         {
  7.             if (idx == gch->dwData)
  8.             {
  9.                 char *bufPtr, *url = mir_t2a(p);
  10.                 for (bufPtr = url; *bufPtr && !isspace(*bufPtr); ++bufPtr) ;
  11.                 *bufPtr++ = 0;
  12.                 CallService(MS_UTILS_OPENURL, 1, (LPARAM)url);
  13.                 mir_free(url);
  14.                 break;
  15.             }
  16.  
  17.             if (++idx > IDM_LINK9) break;
  18.         }
  19.  
  20.         break;
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment