🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #9980

Re: Temporary File

#9980
From: Randel Bjorkquist
Date: Thu, 27 May 2004 13:43
50 lines
3152 bytes
Hey Remy,

Thanks for the information.  I've skimmed the article the link you gave me
went to and I may look into it farther.  The company I work for currently
uses Borland's C++ Builder 6 Enterprise, so I think I'll wait till you get
your new components up and running before trying those.

Randel

"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message
news:40b4f51f$1@newsgroups.borland.com...
>
> "Randel Bjorkquist" <rbjorkquist@coilcraft.com> wrote in message
> news:40b4d96f@newsgroups.borland.com...
>
> > I am retrieving the file and letting windows open it with its
> > associated program.  So if I change it, I'm not sure how to
> > open the file so the end-user can see it.
>
> Rather than using ShellExecute(), you could use FindExecutable() with the
> original filename, and then use CreateProcess() to run the program
directly,
> passing it the temporary filename.  Then it (usually) doesn't matter what
> the filename actually is.  Or, you can just look in the Registry directly
to
> determine how a given file extension should be loaded (you can use my
> TRegExtension component for that: http://reg.lebeausoftware.org).
>
> > I guess I was being lazy by trying to let Windows clean it up without
> > having to write something to do it.
>
> I suggest you read the following article, it explains how to work with the
> Disk Cleanup utility:
>
>     Creating a Disk Cleanup Handler
>
>
http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/shell_int/shell_int_extending/disk_cleanup.asp
>
>     "The basic challenge inherent in disk cleanup is to free as much disk
> space as possible without deleting essential files. Because there is no
> standard way to mark files for cleanup, no single application can reliably
> detect and clean all unessential files. The Disk Cleanup utility addresses
> this problem by splitting the cleanup operation between a single disk
> cleanup manager and a collection of disk cleanup handlers."
>
>
> Gambit
>
>
Technical Details
Message-ID: <40b5f075$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40b2105a$1@newsgroups.borland.com> <40b21210@newsgroups.borland.com> <40b216d1@newsgroups.borland.com> <40b21989$1@newsgroups.borland.com> <40b21cf1$1@newsgroups.borland.com> <40b2276a$1@newsgroups.borland.com> <40b4d96f@newsgroups.borland.com> <40b4f51f$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,30cb4b5f364f10fa
X-Google-Attributes: gid10cc67,public
From: "Randel Bjorkquist" <rbjorkquist@coilcraft.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <40b2105a$1@newsgroups.borland.com> <40b21210@newsgroups.borland.com> <40b216d1@newsgroups.borland.com> <40b21989$1@newsgroups.borland.com> <40b21cf1$1@newsgroups.borland.com> <40b2276a$1@newsgroups.borland.com> <40b4d96f@newsgroups.borland.com> <40b4f51f$1@newsgroups.borland.com>
Subject: Re: Temporary File
Date: Thu, 27 May 2004 08:43:18 -0500
Lines: 52
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 209.172.185.194
Message-ID: <40b5f075$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1085665397 209.172.185.194 (27 May 2004 06:43:17 -0700)
Path: arc1-ca.pugleaf.net!controlnews3.google.com!news1.google.com!news.glorb.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail