Re: Strange hint: Inline function 'DeleteFile' has not been expanded??
- From: Danny Strümpel <dannys9@invalid>
- Date: Tue, 20 May 2008 22:16:57 +0200
Danny Strümpel schrieb:
Ikke schrieb:I'm trying to delete a file in a Delphi console application. Everything works fine and the project compiles, except for one hint which I do not understand:
[Pascal Hint] project.dpr(102): H2443 Inline function 'DeleteFile' has not been expanded because unit 'Windows' is not specified in USES list
If I try to add the Windows unit, I get all sorts of errors on other lines.
Can anybody explain to me what this means?
SysUtils.DeleteFile() calls Windows.DeleteFile()
If I understood it correctly, this error should not show up, unless you are inheriting and expanding SysUtils.DeleteFile(). And this is impossible since DeleteFile() is a routine and not an object's method.
I understood it wrong, and this is half-way nonsense. ;-)
In your Delphi version SysUtils.DeleteFile() seems to be declared using the inline directive. This means that the call to Windows.DeleteFile() would directly replace your call to SysUtils.DeleteFile(). This can only work, if you also bind the Windows unit into the uses clause. If you don't, it will simply not be replaced.
Example:
uses
Windows, SysUtils;
begin
DeleteFile('blah');
end;
Without inlining, this calls SysUtils.DeleteFile() which calls Windows.DeleteFile().
With inlining, this directly calls Windows.DeleteFile().
If you don't include Windows, it simply uses the first way (which is the standard way of calling this function in at least Turbo Explorer).
So, you can ignore this message, your program will work.
--
Too clever is dumb.
-- Ogden Nash
....und wech
Danny <dannys9 (at) gmx (dot) de>
.
- Follow-Ups:
- References:
- Prev by Date: Re: Strange hint: Inline function 'DeleteFile' has not been expanded??
- Next by Date: Re: Strange hint: Inline function 'DeleteFile' has not been expanded??
- Previous by thread: Re: Strange hint: Inline function 'DeleteFile' has not been expanded??
- Next by thread: Re: Strange hint: Inline function 'DeleteFile' has not been expanded??
- Index(es):
Relevant Pages
|