Re: Strange hint: Inline function 'DeleteFile' has not been expanded??
- From: Danny Strümpel <dannys9@invalid>
- Date: Wed, 21 May 2008 20:03:28 +0200
Ikke schrieb:
Danny Strümpel <dannys9@invalid> wrote inIf 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).
But as I already replied to Old Fan, I do not include Windows in the
uses list. As soon as I do, I get all sorts of other errors, but without
it, I still get the hint.
To get rid of this one hint, you need to include Windows - if you don't like to disable the warnings. This means, you need to resolve all other errors and warnings afterwards.
OR...
You implement your own DeleteFile(), indepenent of the Windows unit.
------- 8< -------
interface
function DeleteFile(FileName: PChar): LongBool; stdcall;
implementation
function DeleteFile; external 'kernel32.dll' name 'DeleteFileA';
------- 8< -------
You need to typecast string variables holding the file name to PChar when calling DeleteFile() (that's what SysUtils.DeleteFile() does).
So, you can ignore this message, your program will work.
I know I can just ignore the message, but I'd still like to get rid of
it.
At work, we have a sort of unwritten rule:
1. if you find an error in the source code, fix it before checking the
source in. 2. if you get a hint, treat it like an error :)
Basically a good idea, that's how I do it ;-) When I'm compiling, I don't want to see any messages...
--
Support wildlife -- vote for an orgy.
....und wech
Danny <dannys9 (at) gmx (dot) de>
.
- References:
- Strange hint: Inline function 'DeleteFile' has not been expanded??
- From: Ikke
- Re: Strange hint: Inline function 'DeleteFile' has not been expanded??
- From: Danny Strümpel
- Re: Strange hint: Inline function 'DeleteFile' has not been expanded??
- From: Danny Strümpel
- Re: Strange hint: Inline function 'DeleteFile' has not been expanded??
- From: Ikke
- Strange hint: Inline function 'DeleteFile' has not been expanded??
- Prev by Date: Re: Use pdf as background for form
- Next by Date: Delphi 6 to Delphi 2007
- 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
|