I am no C++ programmer, but I can see where the DQSDLaunch.html file is created in  launcher.cpp.
 
Is it conceivable to use 'szInstallDir' instead of 'szPath' to place the DQSDLaunch.html file into the install directory instead of the system temp directory?
 
Monty
 
From launcher.cpp:
 
// Dump HTML text in temp file
 {
  DWORD cchPath = _MAX_PATH;
  DWORD dwBytesWritten;
  TCHAR szPath[_MAX_PATH];
  ::GetTempPath(cchPath, szPath);
 
  StrNCat(szPath, _T("DQSDLaunch.html"), lengthof(szPath) - _tcslen(szPath) - 1);
  HANDLE hFile = ::CreateFile(szPath, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
  if (hFile == INVALID_HANDLE_VALUE)
   return HRESULT_FROM_WIN32(::GetLastError());
 
  USES_CONVERSION;
 
  CComBSTR bstrOutput, bstrBanner;
  bstrBanner.LoadString(IDS_BANNER);
  bstrOutput.Append(L"<html><body >  bstrOutput.Append(bstrFormName);
  bstrOutput.Append(L".submit();\">\n");
  bstrOutput.Append(bstrBanner);
  bstrOutput.Append(L"\n");
  bstrOutput.Append(bstrHTML);
  bstrOutput.Append(L"\n</body></html>\n");
  ::WriteFile(hFile, OLE2T(bstrOutput), bstrOutput.Length(), &dwBytesWritten, NULL);
  ::FlushFileBuffers(hFile);
 
  ::CloseHandle(hFile);
 
  // Open html associated application, passing DQSDLaunch.html
  HINSTANCE hInstance = ::ShellExecute(NULL, NULL, szPath, NULL, NULL, SW_SHOWNORMAL);
  if (reinterpret_cast<INT>(hInstance) <= 32)
   return E_FAIL;
 }  
 
 return S_OK;
----- Original Message -----
Sent: Thursday, March 25, 2004 10:48 AM
Subject: [DQSD-Devel] temp folder

Hey all,
 
I have a problem with dqsd.  Recently I implemented a ramdisk on my machine, I use it for temp storage so my machine doesnt get clogged up with temporary files.  I also have the system environment variable "temp" and "tmp" assigned to this ramdisk. 
 
 The problem I have is this - when dqsd starts up it writes out an empty dqsdlaunch.html file in the temp folder.   At the time dqsd is loaded, my ramdisk isn't fully functional yet, and I get an error from dqsd indicating an invalid filesystem.    If I close the toolbar and re-open it, and reopen it, all is well from then on.  
 
Does dqsd *have* to write out the empty dqsdlaunch.html file on startup?   or could it use the Quick Search Deskbar directory for this file?
 
Monty
 

Reply via email to