Either way, the patch is this:
//::ShellExecute(m_hWnd, "open", "http://www.livejournal.com/", NULL, NULL, NULL); SHELLEXECUTEINFO structExecution={0}; structExecution.cbSize=sizeof(structExecution); structExecution.fMask=SEE_MASK_NOCLOSEPROCESS|SEE_MASK_FLAG_DDEWAIT; structExecution.lpVerb="open"; char szCommand[MAX_PATH]; HANDLE hFile=CreateFile("temp.htm",GENERIC_WRITE,FILE_SHARE_READ,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_TEMPORARY|FILE_FLAG_NO_BUFFERING|FILE_FLAG_WRITE_THROUGH|FILE_FLAG_DELETE_ON_CLOSE,NULL); if (hFile!=INVALID_HANDLE_VALUE) { DWORD dwBytes=0; WriteFile(hFile,"<HTML> </HTML>",14,&dwBytes,NULL); FindExecutable("temp.htm","",szCommand); CloseHandle(hFile); structExecution.lpParameters="http://www.livejournal.com/"; structExecution.lpFile=szCommand; structExecution.nShow=SW_SHOW; ShellExecuteEx(&structExecution); }
I can't remember where I stole it but basically it looks up the program with which to load ".htm" files, and then uses that to send the url to. Basically it uses the users's default browser, whatever that may be.