delphi 5 and findfirst function


I am still happy with Delphi 5 and Windows XP +SP2 Home edition.
But I cannot decode the file attribute in my searchrecord.
I am using the FindFirst function with srec as the searchrecord.
Now when I inspect the found files I find srec.attr to hold an integer with
value 8224.
The attributeconstants faReadOnly,faHidden,faSysFile etc does not give me
such a great number even
if I 'or' them all in an integer.
Can you explain how to find out how to decode this attr-field


Posted On: Wednesday 26th of September 2012 02:21:43 AM Total Views:  334
View Complete with Replies

RELATED TOPICS OF Delphi Programming PROGRAMMING LANGUAGE




how can i include version info with delphi exe while building with MSBUILD

I have able to set the version while building delphi executable by using the D2007 by enabling include version information in project. But i am using MSBUILD to build my .dpr in command prompt. I want to include the version info with MSBUILD
VIEWS ON THIS POST

341

Posted on:

Wednesday 19th September 2012
View Replies!

D2007 compiler warning msg: Inline function 'AnsiSameStr' has not been expanded because unit 'Windows' is not specified in USES list

I am getting the following compiler warning msg: [DCC Warning] ConfigINIFile.pas(661): H2443 Inline function 'AnsiSameStr' has not been expanded because unit 'Windows' is not specified in USES list what does it mean
VIEWS ON THIS POST

289

Posted on:

Wednesday 19th September 2012
View Replies!

Comments on collapseable function and procedures

Using the {$REGION} directive I can add a comment which gets displayed when I collapse the appropriate line(s), e.g.: {$REGION 'Add column header for available columns grid'} [..] {$ENDREGION} Can I do sthg similar with functions and procedures in Turbo Delphi Pro I can collapse those lines (and others too) but I would like to see a comment behind the function name. I successfully did this using a line like: procedure DBClearDefaultLayout {Clear default layout in DB}; begin [..] end; Collapsing the first line shows me the comment but Is there another way to do this -- cu, Michael
VIEWS ON THIS POST

155

Posted on:

Thursday 20th September 2012
View Replies!

[Delphi 2007] How can i set that delphi start form # from 1(after starting a new VCL project)?

Ahmadi wrote: > After starting new VCL Form Project, my form and unit #(postfix number) is 5 > , sometime is 4! It uses the lowest number that's higher than any of the forms or units that are already in your project folder. > Its wonderful that if my first form # is 5 and i create new form its number > is 7 !!! > [Delphi 2007] How can i set that delphi start form # from 1(after starting a > new VCL project) Delete the other form or unit files from your default project folder. Better yet, give your forms and units meaningful names. The numbers don't tell you or anyone else what your forms or units are for. -- Rob
VIEWS ON THIS POST

354

Posted on:

Friday 21st September 2012
View Replies!

Delphi parameters for DLL function

How do I translate the C parameter "void** buffers" to a Delphi type I know is that it is an array of arrays It is used in a DLL C function that I need to call. Pier
VIEWS ON THIS POST

140

Posted on:

Friday 21st September 2012
View Replies!

Field does not have a corresponding component.

The D2007 IDE two-way tools parser is driving me crazy. I have experienced this bug many times before but it has gone away when the code is recompiled. The IDE warns me that some property in my code is not in the form. But it's not a property at all, it's a function or procedure in this case. It's making me insane. Argh! W
VIEWS ON THIS POST

291

Posted on:

Friday 21st September 2012
View Replies!

Babelcode c# to delphi converter

Is this tool being improved upon or is ins beta stage only http://lingua.codegear.com/babelcode...belClient.aspx Venkatesh
VIEWS ON THIS POST

328

Posted on:

Saturday 22nd September 2012
View Replies!

Calling C-dll from delphi

group, trying to translate a .h file for use within delphi. How do I translate typedef void (*GEOSMessageHandler)(const char *fmt, ...); void initGEOS(GEOSMessageHandler notice_function,GEOSMessageHandler error_function); into something useful for Delphi
VIEWS ON THIS POST

428

Posted on:

Saturday 22nd September 2012
View Replies!

configuring IIS in delphi

Hi I want to write an app in delphi that will configure IIS 5 or 6 as per certain requirements I need for another system. I need to be able to set permissions, enable ISAPI & CGI extentions etc etc can anyone push me in the right direction
VIEWS ON THIS POST

205

Posted on:

Saturday 22nd September 2012
View Replies!

DateTime functions!

Hi! Is there a simple way to get in Delphi date time formated like this: Sat, 07 Sep 2002 09:42:31 GMT
VIEWS ON THIS POST

134

Posted on:

Saturday 22nd September 2012
View Replies!

very fast regexp for delphi?

hi there, i have a problem with application i currently work, i create application that can read data (.dat) generated from GPS (my work only extract data not how GPS will write the data). there was a problem when data file corrupted, so i need to rescue readable data and fortunately the data itself have some specific pattern like this : 06275706129001S106521508E0158269010508T1 and the error would be like asawcier7amdap06281406128995S106520626E0207274010508T1 06281506128989S106520567E0209277010508T2 ..... my first attempt to solve this problem is bypass the line containing error data : readln(InputFile, Data); //treat the input as text file if Data[1] in [0,1,2,3,4,5,6,7,8,9] then //or something like this, forgot writeln(OutputFile, data); //treat the output as text file it works fast (approx 1-2 minutes), but then i realize, if i use this method i'll lose 1 data every 12 seconds, 5 data every 1 minutes and so on... so my second attempt is to grab error data using regexp, since it still readable and not scrabled, but i worried much about the processing time, do it really fast (i need to process approx 2 million data) i use component from http://regexpstudio.com/ maybe the algo will be like this : (read data in input file ->) regexp and found match pattern -> write data into output file
VIEWS ON THIS POST

321

Posted on:

Saturday 22nd September 2012
View Replies!

FileSize function

I want to check if the file size greater than 8MB. So I assume I need to check if FileSize(F) > (8 * 1024 * 1024)
VIEWS ON THIS POST

87

Posted on:

Saturday 22nd September 2012
View Replies!

python for delphi

Latest version works with python 2.3, anyone knows if the project is still alive
VIEWS ON THIS POST

325

Posted on:

Sunday 23rd September 2012
View Replies!

wishlist: a STRINGOF function in Delphi

A significant gap in the Delphi language is the absence of a "STRINGOF" function, which exists in virtually all versions of Pascal, past and present, on the Mac. Besides being an inherently very useful function, its absence increases the difficulty of translating Mac code to Delphi. STRINGOF takes as its arguments a variable number of terms which can include width and precision values. Terms may be strings, integers, or real values, as in this: s := STRINGOF('Score of ', score:8:3, ' in ', num:1, ' tries'); Since it is a function, not a procedure, and since it returns a string, it is tremendously useful for logging, user messages, or quick'n'dirty debugging, e.g., Alert(STRINGOF('Score of ', score:8:3, ' in ', num:1, ' tries')); Delphi's "Str" can do one term at a time, but the above statement is obviously much more clear and convenient than this: var s, t: string; begin ... s := Str(score:8:3); t := Str(num:1); Alert('Score of ' + s + ' in ' + t + ' tries'); THEREFORE ... Here's my vote for a real STRINGOF function to be added to Delphi! -- Kevin Killion
VIEWS ON THIS POST

139

Posted on:

Monday 24th September 2012
View Replies!

Call a PHP function from Delphi?

Hi all, I wonder if its, somehow, possible to call a PHP function from Delphi code, and somehow also pick up the return value (string) from the function. Example: public function dosomething( $text, &$title, $options, $linestart = true, $clearState = true, $revid = null ) { // ... return $this->blahblah; }
VIEWS ON THIS POST

140

Posted on:

Monday 24th September 2012
View Replies!

How can I do to remove the Delphi compiler message "Return value of function 'MyFunction' might be undefined" ?

Before to modify my "old" delphi code, I would like to know if there is a different way to remove the Delphi compiler message "Return value of function 'MyFunction' might be undefined". For example, here is some code that generates this warning message : .... type TrvSampleType = (stTwo, stThree); ..... function GetSampleType(AValue: Integer):TrvSampleType; begin if (AValue Mod 2 = 0) then Result := stTwo else if (AValue Mod 3 = 0) then Result := stThree; end; What I should write is something like that : type TrvSampleType = (stNone, stTwo, stThree); ..... function GetSampleType(AValue: Integer):TrvSampleType; begin if (AValue Mod 2 = 0) then Result := stTwo else if (AValue Mod 3 = 0) then Result := stThree else Result := stNone; end; But in fact, I don't want to add a new sample type value like a stNone, so how can I assign a "null" value to the Result var to avoid the warning Delphi message Thank you for your help. Laurent
VIEWS ON THIS POST

295

Posted on:

Tuesday 25th September 2012
View Replies!

Seek function

"Squirrel30" > AssignFile(myFile, 'Konzola.ini'); > ReWrite(myFile); > Seek(myFile,1); > write(myFile,'version='+VezijaServer); > CloseFile(myFile); > Why the seek method doesnt work says: Incopatible types Squirrel, So why don't you check Help for the types that Seek() allows, vs. the type of your "myFile" variable HTH, JohnH > --- posted by geoForum on http://delphi.newswhat.com Hmm!
VIEWS ON THIS POST

131

Posted on:

Tuesday 25th September 2012
View Replies!