ljnp4u (ljnp4u) wrote in lj_clients,
ljnp4u
ljnp4u
lj_clients

  • Music:

Sorry, should have done this sooner.

Somebody complained in support request http://www.livejournal.com/support/see_request.bml?id=57140 that his livejournal client would not open any of the links in his browser, so I made a patched version available for him in a reply, but that one is still screened.

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.
Subscribe
  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 8 comments