Hi Jason,

Not exactly the answer to your question, but when I had to do this for Pdox.db
via BDE, it was put to me that there may not even be a temp dir. I needed a
private dir, and created my own, hanging off the windows dir. Here's the
function, maybe it's of some help to you.

Cheers,
Craig.

function SetPrivateDir: string;
var
  pPath: PChar;
  iLength: integer;
  sTempPath: string;
begin
  pPath :=AllocMem(MAX_PATH);
  try
    iLength := GetWindowsDirectory(pPath,MAX_PATH);
    sTempPath := StrPas(pPath);
  finally
    FreeMem(pPath);
  end;
  if (sTempPath[iLength] = '\') then
    sTempPath := sTempPath + 'SCSTemp'
  else
    sTempPath := sTempPath + '\SCSTemp';
  if not DirectoryExists(sTempPath) then begin
    if not CreateDir(sTempPath) then begin
      MessageDlg('Unable to create Temp Directory', mtError, [mbOk], 0);
      Halt;
    end;
  end;
  Result := sTempPath;
end;


Jason Coley wrote:

> Hi,
>
> I need to fin the temp directory, but the GetTempPath func returns the
> short filename structure, Is there a proc that returns the full long
> filename dir string?
>
> Regards
> Jason Coley
> Manawatu Software Solutions
> http://www.software-solutions.co.nz
> <http://www.software-solutions.co.nz/>
>
> ---------------------------------------------------------------------------
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to