[DUG] File Path
Hi I have an executable which I need to access that is installed in Program Files. With the advent of 64 byte in Windows 7, I need to distinguish which of the two file paths to use depending on the operating system. Win 7 path - C:\Program Files (x86)\... or Win XP path - C:\Program Files\... Any thoughts on an easy way to do this would be appreciated. Bob ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] File Path
Hi Bob, Will following code work? ExtractFilePath(Application.ExeName) Regards Leigh 2011/6/21 Bob Pawley rjpaw...@shaw.ca Hi I have an executable which I need to access that is installed in Program Files. With the advent of 64 byte in Windows 7, I need to distinguish which of the two file paths to use depending on the operating system. Win 7 path - C:\Program Files (x86)\... or Win XP path - C:\Program Files\... Any thoughts on an easy way to do this would be appreciated. Bob ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] File Path
Hi Bob Info is in the linked article http://delphi.about.com/od/kbwinshell/a/SHGetFolderPath.htm Cheers David On 21/06/11 05:25, Bob Pawley wrote: Hi I have an executable which I need to access that is installed in Program Files. With the advent of 64 byte in Windows 7, I need to distinguish which of the two file paths to use depending on the operating system. Win 7 path - C:\Program Files (x86)\... or Win XP path - C:\Program Files\... Any thoughts on an easy way to do this would be appreciated. Bob ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] File/Dir Open at My Computer
Well it is what I was looking for but I probably won’t use it as it is incredibly ugly – as in it has Windows 3.1 look. Is this really the most modern version of selecting a drive I can use on Windows 7? John From: Rohit Gupta Sent: Monday, May 23, 2011 2:37 PM To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] File/Dir Open at My Computer John, the TDriveCombobox should do the trick. On 20/05/2011 1:35 a.m., John Bird wrote: I want to bring up a dialog to select a drive (Will be usually a removable USB drive). Can I do this with any of the standard Delphi TOpenDialog or SelectDirectory etc? Ideally I want to bring up a dialog starting at My Computer...(D2007) [Aside - I know how to show My Computer by starting Windows Explorer: To start with my computer: explorer.exe /n,/e,/select, c:\ To start with desktop: %SystemRoot%\explorer.exe /e,%USERPROFILE%\Desktop – it can show the drive but doesn’t return the drive letter to Delphi as it comes up as a separate process of course] John __ Information from ESET NOD32 Antivirus, version of virus signature database 6134 (20110519) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe __ Information from ESET NOD32 Antivirus, version of virus signature database 6134 (20110519) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- Regards Rohit Gupta B.E. Elec., M.E., Mem IEEE, Mem IET Technical Director Computer Fanatics Ltd Tel 4892280 Fax 4892290 Web www.cfl.co.nz This email and any attachments contain information, which is confidential and may be subject to legal privilege and copyright. If you are not the intended recipient, you must not use, distribute or copy this email or attachments. If you have received this in error, please notify us immediately by return email and then delete this email and any attachments. ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] File/Dir Open at My Computer
May need to build your own: var MyStr: PChar; i, Length: Integer; const Size: Integer = 200; begin GetMem(MyStr, Size); Length:=GetLogicalDriveStrings(Size, MyStr); for i:=0 to Length-1 do begin if (MyStr[i]='a')and(MyStr[i]='z') then Memo1.Lines.Add(MyStr[i]+':\'); end; FreeMem(MyStr); end; From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of John Bird Sent: Friday, 20 May 2011 1:35 a.m. To: NZ Borland Developers Group - Delphi List Subject: [DUG] File/Dir Open at My Computer I want to bring up a dialog to select a drive (Will be usually a removable USB drive). Can I do this with any of the standard Delphi TOpenDialog or SelectDirectory etc? Ideally I want to bring up a dialog starting at My Computer...(D2007) [Aside - I know how to show My Computer by starting Windows Explorer: To start with my computer: explorer.exe /n,/e,/select, c:\ To start with desktop: %SystemRoot%\explorer.exe /e,%USERPROFILE%\Desktop – it can show the drive but doesn’t return the drive letter to Delphi as it comes up as a separate process of course] John ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] File/Dir Open at My Computer
Have a look at the JEDI VCL - TJvDriveCombo (in the Jv Lists, Combos, Trees tab) does this much better and looks good too. On Mon, May 23, 2011 at 6:36 PM, John Bird johnkb...@paradise.net.nz wrote: Well it is what I was looking for but I probably won’t use it as it is incredibly ugly – as in it has Windows 3.1 look. Is this really the most modern version of selecting a drive I can use on Windows 7? John From: Rohit Gupta Sent: Monday, May 23, 2011 2:37 PM To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] File/Dir Open at My Computer John, the TDriveCombobox should do the trick. On 20/05/2011 1:35 a.m., John Bird wrote: I want to bring up a dialog to select a drive (Will be usually a removable USB drive). Can I do this with any of the standard Delphi TOpenDialog or SelectDirectory etc? Ideally I want to bring up a dialog starting at My Computer...(D2007) [Aside - I know how to show My Computer by starting Windows Explorer: To start with my computer: explorer.exe /n,/e,/select, c:\ To start with desktop: %SystemRoot%\explorer.exe /e,%USERPROFILE%\Desktop – it can show the drive but doesn’t return the drive letter to Delphi as it comes up as a separate process of course] John __ Information from ESET NOD32 Antivirus, version of virus signature database 6134 (20110519) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe __ Information from ESET NOD32 Antivirus, version of virus signature database 6134 (20110519) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- Regards Rohit Gupta B.E. Elec., M.E., Mem IEEE, Mem IET Technical Director Computer Fanatics Ltd Tel 4892280 Fax 4892290 Web www.cfl.co.nz This email and any attachments contain information, which is confidential and may be subject to legal privilege and copyright. If you are not the intended recipient, you must not use, distribute or copy this email or attachments. If you have received this in error, please notify us immediately by return email and then delete this email and any attachments. ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe -- Regards, Pawel Rewak Practical Programs ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] File/Dir Open at My Computer
Have looked at the MegaDemo program and downloaded the whole JVCL V3.40 and looks promising - and arrived at the same point I recall being at in the past - trying to figure out how to install it as installation information is scarce... - do you have either info or a link to guide to install on D2007? John -Original Message- From: Pawel Rewak Sent: Tuesday, May 24, 2011 11:02 AM To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] File/Dir Open at My Computer Have a look at the JEDI VCL - TJvDriveCombo (in the Jv Lists, Combos, Trees tab) does this much better and looks good too. On Mon, May 23, 2011 at 6:36 PM, John Bird johnkb...@paradise.net.nz wrote: Well it is what I was looking for but I probably won’t use it as it is incredibly ugly – as in it has Windows 3.1 look. Is this really the most modern version of selecting a drive I can use on Windows 7? John From: Rohit Gupta Sent: Monday, May 23, 2011 2:37 PM To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] File/Dir Open at My Computer John, the TDriveCombobox should do the trick. On 20/05/2011 1:35 a.m., John Bird wrote: I want to bring up a dialog to select a drive (Will be usually a removable USB drive). Can I do this with any of the standard Delphi TOpenDialog or SelectDirectory etc? Ideally I want to bring up a dialog starting at My Computer...(D2007) [Aside - I know how to show My Computer by starting Windows Explorer: To start with my computer: explorer.exe /n,/e,/select, c:\ To start with desktop: %SystemRoot%\explorer.exe /e,%USERPROFILE%\Desktop – it can show the drive but doesn’t return the drive letter to Delphi as it comes up as a separate process of course] John __ Information from ESET NOD32 Antivirus, version of virus signature database 6134 (20110519) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe __ Information from ESET NOD32 Antivirus, version of virus signature database 6134 (20110519) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- Regards Rohit Gupta B.E. Elec., M.E., Mem IEEE, Mem IET Technical Director Computer Fanatics Ltd Tel 4892280 Fax 4892290 Web www.cfl.co.nz This email and any attachments contain information, which is confidential and may be subject to legal privilege and copyright. If you are not the intended recipient, you must not use, distribute or copy this email or attachments. If you have received this in error, please notify us immediately by return email and then delete this email and any attachments. ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe -- Regards, Pawel Rewak Practical Programs ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] File/Dir Open at My Computer
The JVCL has a self-building installer. Simply run install.bat from the JCL folder - this should build and run the installer which in turn - iirc - will identify which versions of Delphi you have installed and present a tab of installation settings for each Delphi version. It should all be very straightforward. -Original Message- From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of John Bird Sent: Tuesday, 24 May 2011 15:49 To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] File/Dir Open at My Computer Have looked at the MegaDemo program and downloaded the whole JVCL V3.40 and looks promising - and arrived at the same point I recall being at in the past - trying to figure out how to install it as installation information is scarce... - do you have either info or a link to guide to install on D2007? John -Original Message- From: Pawel Rewak Sent: Tuesday, May 24, 2011 11:02 AM To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] File/Dir Open at My Computer Have a look at the JEDI VCL - TJvDriveCombo (in the Jv Lists, Combos, Trees tab) does this much better and looks good too. On Mon, May 23, 2011 at 6:36 PM, John Bird johnkb...@paradise.net.nz wrote: Well it is what I was looking for but I probably won’t use it as it is incredibly ugly – as in it has Windows 3.1 look. Is this really the most modern version of selecting a drive I can use on Windows 7? John From: Rohit Gupta Sent: Monday, May 23, 2011 2:37 PM To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] File/Dir Open at My Computer John, the TDriveCombobox should do the trick. On 20/05/2011 1:35 a.m., John Bird wrote: I want to bring up a dialog to select a drive (Will be usually a removable USB drive). Can I do this with any of the standard Delphi TOpenDialog or SelectDirectory etc? Ideally I want to bring up a dialog starting at My Computer...(D2007) [Aside - I know how to show My Computer by starting Windows Explorer: To start with my computer: explorer.exe /n,/e,/select, c:\ To start with desktop: %SystemRoot%\explorer.exe /e,%USERPROFILE%\Desktop – it can show the drive but doesn’t return the drive letter to Delphi as it comes up as a separate process of course] John __ Information from ESET NOD32 Antivirus, version of virus signature database 6134 (20110519) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe __ Information from ESET NOD32 Antivirus, version of virus signature database 6134 (20110519) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- Regards Rohit Gupta B.E. Elec., M.E., Mem IEEE, Mem IET Technical Director Computer Fanatics Ltd Tel 4892280 Fax 4892290 Web www.cfl.co.nz This email and any attachments contain information, which is confidential and may be subject to legal privilege and copyright. If you are not the intended recipient, you must not use, distribute or copy this email or attachments. If you have received this in error, please notify us immediately by return email and then delete this email and any attachments. ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe -- Regards, Pawel Rewak Practical Programs ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] File/Dir Open at My Computer
Ah wait, I think I am thinking of the JCL. -Original Message- From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of John Bird Sent: Tuesday, 24 May 2011 15:49 To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] File/Dir Open at My Computer Have looked at the MegaDemo program and downloaded the whole JVCL V3.40 and looks promising - and arrived at the same point I recall being at in the past - trying to figure out how to install it as installation information is scarce... - do you have either info or a link to guide to install on D2007? John -Original Message- From: Pawel Rewak Sent: Tuesday, May 24, 2011 11:02 AM To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] File/Dir Open at My Computer Have a look at the JEDI VCL - TJvDriveCombo (in the Jv Lists, Combos, Trees tab) does this much better and looks good too. On Mon, May 23, 2011 at 6:36 PM, John Bird johnkb...@paradise.net.nz wrote: Well it is what I was looking for but I probably won’t use it as it is incredibly ugly – as in it has Windows 3.1 look. Is this really the most modern version of selecting a drive I can use on Windows 7? John From: Rohit Gupta Sent: Monday, May 23, 2011 2:37 PM To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] File/Dir Open at My Computer John, the TDriveCombobox should do the trick. On 20/05/2011 1:35 a.m., John Bird wrote: I want to bring up a dialog to select a drive (Will be usually a removable USB drive). Can I do this with any of the standard Delphi TOpenDialog or SelectDirectory etc? Ideally I want to bring up a dialog starting at My Computer...(D2007) [Aside - I know how to show My Computer by starting Windows Explorer: To start with my computer: explorer.exe /n,/e,/select, c:\ To start with desktop: %SystemRoot%\explorer.exe /e,%USERPROFILE%\Desktop – it can show the drive but doesn’t return the drive letter to Delphi as it comes up as a separate process of course] John __ Information from ESET NOD32 Antivirus, version of virus signature database 6134 (20110519) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe __ Information from ESET NOD32 Antivirus, version of virus signature database 6134 (20110519) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- Regards Rohit Gupta B.E. Elec., M.E., Mem IEEE, Mem IET Technical Director Computer Fanatics Ltd Tel 4892280 Fax 4892290 Web www.cfl.co.nz This email and any attachments contain information, which is confidential and may be subject to legal privilege and copyright. If you are not the intended recipient, you must not use, distribute or copy this email or attachments. If you have received this in error, please notify us immediately by return email and then delete this email and any attachments. ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe -- Regards, Pawel Rewak Practical Programs ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] File/Dir Open at My Computer
Yes, I was thinking of JCL - but the JVCL has the same installer model... run install.bat from the jvcl root folder, and this should build and launch the JVCL installer. What happens from there I don't know - as you may have guessed, I have previously installed the JCL but not the J*V*CL. :) -Original Message- From: delphi-boun...@delphi.org.nz [mailto:delphi-boun...@delphi.org.nz] On Behalf Of John Bird Sent: Tuesday, 24 May 2011 15:49 To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] File/Dir Open at My Computer Have looked at the MegaDemo program and downloaded the whole JVCL V3.40 and looks promising - and arrived at the same point I recall being at in the past - trying to figure out how to install it as installation information is scarce... - do you have either info or a link to guide to install on D2007? John -Original Message- From: Pawel Rewak Sent: Tuesday, May 24, 2011 11:02 AM To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] File/Dir Open at My Computer Have a look at the JEDI VCL - TJvDriveCombo (in the Jv Lists, Combos, Trees tab) does this much better and looks good too. On Mon, May 23, 2011 at 6:36 PM, John Bird johnkb...@paradise.net.nz wrote: Well it is what I was looking for but I probably won’t use it as it is incredibly ugly – as in it has Windows 3.1 look. Is this really the most modern version of selecting a drive I can use on Windows 7? John From: Rohit Gupta Sent: Monday, May 23, 2011 2:37 PM To: NZ Borland Developers Group - Delphi List Subject: Re: [DUG] File/Dir Open at My Computer John, the TDriveCombobox should do the trick. On 20/05/2011 1:35 a.m., John Bird wrote: I want to bring up a dialog to select a drive (Will be usually a removable USB drive). Can I do this with any of the standard Delphi TOpenDialog or SelectDirectory etc? Ideally I want to bring up a dialog starting at My Computer...(D2007) [Aside - I know how to show My Computer by starting Windows Explorer: To start with my computer: explorer.exe /n,/e,/select, c:\ To start with desktop: %SystemRoot%\explorer.exe /e,%USERPROFILE%\Desktop – it can show the drive but doesn’t return the drive letter to Delphi as it comes up as a separate process of course] John __ Information from ESET NOD32 Antivirus, version of virus signature database 6134 (20110519) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe __ Information from ESET NOD32 Antivirus, version of virus signature database 6134 (20110519) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- Regards Rohit Gupta B.E. Elec., M.E., Mem IEEE, Mem IET Technical Director Computer Fanatics Ltd Tel 4892280 Fax 4892290 Web www.cfl.co.nz This email and any attachments contain information, which is confidential and may be subject to legal privilege and copyright. If you are not the intended recipient, you must not use, distribute or copy this email or attachments. If you have received this in error, please notify us immediately by return email and then delete this email and any attachments. ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe -- Regards, Pawel Rewak Practical Programs ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] File/Dir Open at My Computer
John, the TDriveCombobox should do the trick. On 20/05/2011 1:35 a.m., John Bird wrote: I want to bring up a dialog to select a drive (Will be usually a removable USB drive). Can I do this with any of the standard Delphi TOpenDialog or SelectDirectory etc? Ideally I want to bring up a dialog starting at My Computer...(D2007) [Aside - I know how to show My Computer by starting Windows Explorer: To start with my computer: explorer.exe /n,/e,/select, c:\ To start with desktop: %SystemRoot%\explorer.exe /e,%USERPROFILE%\Desktop – it can show the drive but doesn’t return the drive letter to Delphi as it comes up as a separate process of course] John __ Information from ESET NOD32 Antivirus, version of virus signature database 6134 (20110519) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe __ Information from ESET NOD32 Antivirus, version of virus signature database 6134 (20110519) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com -- Regards *Rohit Gupta* B.E. Elec., M.E., Mem IEEE, Mem IET Technical Director Computer Fanatics Ltd *Tel *4892280 *Fax *4892290 *Web *www.cfl.co.nz This email and any attachments contain information, which is confidential and may be subject to legal privilege and copyright. If you are not the intended recipient, you must not use, distribute or copy this email or attachments. If you have received this in error, please notify us immediately by return email and then delete this email and any attachments. ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
[DUG] File/Dir Open at My Computer
I want to bring up a dialog to select a drive (Will be usually a removable USB drive). Can I do this with any of the standard Delphi TOpenDialog or SelectDirectory etc? Ideally I want to bring up a dialog starting at My Computer...(D2007) [Aside - I know how to show My Computer by starting Windows Explorer: To start with my computer: explorer.exe /n,/e,/select, c:\ To start with desktop: %SystemRoot%\explorer.exe /e,%USERPROFILE%\Desktop – it can show the drive but doesn’t return the drive letter to Delphi as it comes up as a separate process of course] John___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: unsubscribe
Re: [DUG] file tranfering issue
Hi Bevan thanks for the reply well no it dont run all time. my cleitn has kept a job shceduler so that it runs at 1 am every morning. . For copyign the image i used window copy function mentioed in API. It runs as desktop application. Yeah i am nott sure how it looses an network authentication. Int the same way my query also start to fail. I have chekced for the time out also but thats not the case sicne i have increased the timeout time in ODBC setting. And this application is running at different location of bank site. Only problem were this application try to pull say records in thousnads it gives thsi issue. hOWEVER Where the volume is elss it works fine. I will appreciate for any further suggestion On 5/8/08, Bevan Edwards [EMAIL PROTECTED] wrote: Hi Vikas, Is the application running all the time? Does it run as as desktop application or Windows Service? Could it be losing the network authentication credentials somehow? Regards, Bevan Vikas... wrote: Hi we have a application running at my client side. it is client server based architecture. thing is the application at my regional side fectch information from central server and copies the image from the source location. we maintaned a table in regional side so based on the status on table the inforamtion get copied to the regional database along with the image. Now the problme is when the volume is high let say we have 4000 records to fetcg that time things start to happen very weired. It gives message in the file sayign source file doesn not exist and hence it rollbacks the transaction. But when i tried to manual check the soruce path by going to run and \\sourcepath\filename file://\\sourcepath\filename. It shows it is there I am not sure what actually going on. when i kill the applciation and run for the secodn time it works. Sometime it gievs error is dtabse query saying error in select statement though i know the query si right. This problem dotn occuer everyday sometime. Any clue did anyone faced such issue -- vikas ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe __ NOD32 2865 (20080211) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe -- vikas ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe
[DUG] file tranfering issue
Hi we have a application running at my client side. it is client server based architecture. thing is the application at my regional side fectch information from central server and copies the image from the source location. we maintaned a table in regional side so based on the status on table the inforamtion get copied to the regional database along with the image. Now the problme is when the volume is high let say we have 4000 records to fetcg that time things start to happen very weired. It gives message in the file sayign source file doesn not exist and hence it rollbacks the transaction. But when i tried to manual check the soruce path by going to run and \\sourcepath\filename. It shows it is there I am not sure what actually going on. when i kill the applciation and run for the secodn time it works. Sometime it gievs error is dtabse query saying error in select statement though i know the query si right. This problem dotn occuer everyday sometime. Any clue did anyone faced such issue -- vikas ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe
Re: [DUG] file tranfering issue
Hi Vikas, Is the application running all the time? Does it run as as desktop application or Windows Service? Could it be losing the network authentication credentials somehow? Regards, Bevan Vikas... wrote: Hi we have a application running at my client side. it is client server based architecture. thing is the application at my regional side fectch information from central server and copies the image from the source location. we maintaned a table in regional side so based on the status on table the inforamtion get copied to the regional database along with the image. Now the problme is when the volume is high let say we have 4000 records to fetcg that time things start to happen very weired. It gives message in the file sayign source file doesn not exist and hence it rollbacks the transaction. But when i tried to manual check the soruce path by going to run and \\sourcepath\filename file://\\sourcepath\filename. It shows it is there I am not sure what actually going on. when i kill the applciation and run for the secodn time it works. Sometime it gievs error is dtabse query saying error in select statement though i know the query si right. This problem dotn occuer everyday sometime. Any clue did anyone faced such issue -- vikas ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe __ NOD32 2865 (20080211) Information __ This message was checked by NOD32 antivirus system. http://www.eset.com ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe
RE: [DUG] File handling help in Delphi 5
I thought I had read in the help sometime that file variables could never be used in an array - but it looks like you are doing just that. For instance under File Types: Files are not allowed in arrays or records. If it is OK I also would like to do that as well - any rulings anyone? John AssignFile(Ltextfile[l1],Ftextfilelists[l1]); reset(Ltextfile[l1]); ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe
Re: [DUG] File handling help in Delphi 5
Vikas These are very old routines that date back to Pascal, look at TStrings (as suggested) and Streams HTH Neven Hi I am back again. Well i need one help in file handling. May be i sound dump here but i struck up badly at one point here. Ok let me first explain my first situation. I have say 10 files and path is say c:\vikas\file1textupto c:\vikas\file10.text. I am storyng all this in string list ok Here is my sample code / setlength(Ltextfile, (Ftextfilelists.Count)); for L1 := 0 to Ftextfilelists.Count-1 do begin AssignFile(Ltextfile[l1],Ftextfilelists[l1]); reset(Ltextfile[l1]); while not Eof(Ltextfile[l1]) do begin Readln(Ltextfile[l1]); while not Eof(Ltextfile[l1]) do begin Readln(Ltextfile[l1],Lbuff); Do something end;- // heere ftextfilelists is a string list , ltextfile is an dynamic array of textfile Ok my problem here is in Lbuff as u can see i am storing the file information say file1.txt content and inside this file i have say 20 rows of information like this (*** 1 a vb sdsdadadasdas asdadadasdasd asdadasdasdasdasd 2 aldkasdk;asdk;alskd;aslkd;alkd;alkd;aslkd;askd;askd;alkd;askd 3 asldkas;dk;asdka;sdk;alsdk;alsdk;aslkd;alskd;alskd;alskd;laskd ***} Now the problem is the above code takes the value from 2 instead of 1 it ignores the first row of information and this si what confusing me I may be sound stupid here but i will apreciate if anyone suggest me something wrong in my above code logic Thanks Vikas -- vikas ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe
[DUG] File handling help in Delphi 5
Hi I am back again. Well i need one help in file handling. May be i sound dump here but i struck up badly at one point here. Ok let me first explain my first situation. I have say 10 files and path is say c:\vikas\file1textupto c:\vikas\file10.text. I am storyng all this in string list ok Here is my sample code / setlength(Ltextfile, (Ftextfilelists.Count)); for L1 := 0 to Ftextfilelists.Count-1 do begin AssignFile(Ltextfile[l1],Ftextfilelists[l1]); reset(Ltextfile[l1]); while not Eof(Ltextfile[l1]) do begin Readln(Ltextfile[l1]); while not Eof(Ltextfile[l1]) do begin Readln(Ltextfile[l1],Lbuff); Do something end;- // heere ftextfilelists is a string list , ltextfile is an dynamic array of textfile Ok my problem here is in Lbuff as u can see i am storing the file information say file1.txt content and inside this file i have say 20 rows of information like this (*** 1 a vb sdsdadadasdas asdadadasdasd asdadasdasdasdasd 2 aldkasdk;asdk;alskd;aslkd;alkd;alkd;aslkd;askd;askd;alkd;askd 3 asldkas;dk;asdka;sdk;alsdk;alsdk;aslkd;alskd;alskd;alskd;laskd ***} Now the problem is the above code takes the value from 2 instead of 1 it ignores the first row of information and this si what confusing me I may be sound stupid here but i will apreciate if anyone suggest me something wrong in my above code logic Thanks Vikas -- vikas ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe
Re: [DUG] File handling help in Delphi 5
Thanks Harris your solution solved my problem On 12/5/07, Kyley Harris [EMAIL PROTECTED] wrote: Your problem is that you are calling readln once before the while loop, without passing the data to lbuff.. this is reading the first line.. I suggest.. scrapping the assign readln method for.. s := TStringList.Create ; s.loadfromfile(AFilename) for i := 0 to s.count -1 do begin lbuff := s[i]; dosomething end; On Dec 5, 2007 6:34 PM, Vikas... [EMAIL PROTECTED] wrote: Hi I am back again. Well i need one help in file handling. May be i sound dump here but i struck up badly at one point here. Ok let me first explain my first situation. I have say 10 files and path is say c:\vikas\file1textupto c:\vikas\file10.text. I am storyng all this in string list ok Here is my sample code / setlength(Ltextfile, (Ftextfilelists.Count)); for L1 := 0 to Ftextfilelists.Count-1 do begin AssignFile(Ltextfile[l1],Ftextfilelists[l1]); reset(Ltextfile[l1]); while not Eof(Ltextfile[l1]) do begin Readln(Ltextfile[l1]); while not Eof(Ltextfile[l1]) do begin Readln(Ltextfile[l1],Lbuff); Do something end;- // heere ftextfilelists is a string list , ltextfile is an dynamic array of textfile Ok my problem here is in Lbuff as u can see i am storing the file information say file1.txt content and inside this file i have say 20 rows of information like this (*** 1 a vb sdsdadadasdas asdadadasdasd asdadasdasdasdasd 2 aldkasdk;asdk;alskd;aslkd;alkd;alkd;aslkd;askd;askd;alkd;askd 3 asldkas;dk;asdka;sdk;alsdk;alsdk;aslkd;alskd;alskd;alskd;laskd ***} Now the problem is the above code takes the value from 2 instead of 1 it ignores the first row of information and this si what confusing me I may be sound stupid here but i will apreciate if anyone suggest me something wrong in my above code logic Thanks Vikas -- vikas ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe -- Kyley Harris Harris Software +64-21-671-821 ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe -- vikas ___ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe
Re: [DUG]: File properties
Yip thats it :-) Thanks Andreas --- 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/
[DUG]: File properties
Hi All When you right click on a file on the Windows Desktop one of the options is to select Properties. How can I invoke the same Properties Window from inside my app? Thanks Kevin --- 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/
Re: [DUG]: File properties
Are you wanting to, programmatically, view the properties window or modify the properties that are displayed in the window ? Regards Paul McKenzie Analyst Programmer SMSS Ltd. - Original Message - From: Kevin Parker [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Sent: Thursday, October 03, 2002 6:42 PM Subject: [DUG]: File properties Hi All When you right click on a file on the Windows Desktop one of the options is to select Properties. How can I invoke the same Properties Window from inside my app? Thanks Kevin -- - 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/
RE: [DUG]: File properties
Is this what you mean? uses ShellAPI; var SEI: TShellExecuteInfo; begin FillChar(SEI, SizeOf(SEI), 0); SEI.cbSize := SizeOf(SEI); SEI.lpFile := 'Project1.exe'; // Replace as required SEI.lpVerb := 'Properties'; SEI.fMask := SEE_MASK_INVOKEIDLIST; ShellExecuteEx(@SEI); end; -Andreas -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Kevin Parker Sent: Thursday, 3 October 2002 18:43 To: Multiple recipients of list delphi Subject: [DUG]: File properties Hi All When you right click on a file on the Windows Desktop one of the options is to select Properties. How can I invoke the same Properties Window from inside my app? Thanks Kevin --- 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/
RE: RE: [DUG]: File Export Speed
Title: Message I did this and we got a marginal speed improvement of about 10 seconds (out of 180). Doing further testing I found that the .AsString takes the majority of the time. Stacey -Original Message-From: Paul Heinz [mailto:[EMAIL PROTECTED]] Sent: Thursday, 8 August 2002 6:15 p.m.To: Multiple recipients of list delphiSubject: RE: [DUG]: File Export Speed Corey wrote: - Original Message - From: Myles Penlington To: Multiple recipients of list delphi Sent: Wednesday, August 07, 2002 10:20 AM Subject: RE: [DUG]: File Export Speed LRow := ''; for i := 0 to PQuery.FieldCount - 1 do begin LRow := LRow + PQuery.Fields[i].AsString + '|'; end; LRow := LRow + #13#10; This string concatenation will be very slow - it is a N squared algorithm for the number of bytes copied ie bad news. Not quite that bad.AFAIK Strings allocate memory a block at a time... but it's still pretty bad. I wrote a program that passed Strings down a recursive tree search, then rewrote it using PChars and got a major speed increase...run time went from an average of 2 minutes to a little over 18 seconds. Definitely worth the extra coding effort. Yes, it is an O(N squared) algorithm since each string concatenation will require an extension which means allocating a new bigger string and copying the result over. Copying the string will take an amount of time proportional to the current length (a function of N) and this will be done a number of times that is a function of N. Hence, overall O(N squared) where N isRows * Fields. Also, the Delphi memory manager does not handle the continual expansion access pattern very welland gets heavily fragmented which means even the allocation step may well start taking time proportional to some log of N. So it might even get up toO(N squared log N). Nasty! Change the code to write each string field independently (i.e. avoid concatenations) and the algorithm will run much faster and still offer text output. Some buffering on the TFileStream may help as well to avoid many small writes but the OS should do a fair job of that for you. TTFN, Paul.
Re: RE: [DUG]: File Export Speed
Title: Message If you get the Query to do the concatenation - 1 AsString per row. Can you do what you require in a StoredProc and return 1 large string which you then deal to (I can't remember what you were doing with it). RegardsPaul McKenzieAnalyst ProgrammerSMSS Ltd. - Original Message - From: Stacey Verner To: Multiple recipients of list delphi Sent: Friday, August 09, 2002 8:45 AM Subject: RE: RE: [DUG]: File Export Speed I did this and we got a marginal speed improvement of about 10 seconds (out of 180). Doing further testing I found that the .AsString takes the majority of the time. Stacey -Original Message-From: Paul Heinz [mailto:[EMAIL PROTECTED]] Sent: Thursday, 8 August 2002 6:15 p.m.To: Multiple recipients of list delphiSubject: RE: [DUG]: File Export Speed Corey wrote: - Original Message - From: Myles Penlington To: Multiple recipients of list delphi Sent: Wednesday, August 07, 2002 10:20 AM Subject: RE: [DUG]: File Export Speed LRow := ''; for i := 0 to PQuery.FieldCount - 1 do begin LRow := LRow + PQuery.Fields[i].AsString + '|'; end; LRow := LRow + #13#10; This string concatenation will be very slow - it is a N squared algorithm for the number of bytes copied ie bad news. Not quite that bad.AFAIK Strings allocate memory a block at a time... but it's still pretty bad. I wrote a program that passed Strings down a recursive tree search, then rewrote it using PChars and got a major speed increase...run time went from an average of 2 minutes to a little over 18 seconds. Definitely worth the extra coding effort. Yes, it is an O(N squared) algorithm since each string concatenation will require an extension which means allocating a new bigger string and copying the result over. Copying the string will take an amount of time proportional to the current length (a function of N) and this will be done a number of times that is a function of N. Hence, overall O(N squared) where N isRows * Fields. Also, the Delphi memory manager does not handle the continual expansion access pattern very welland gets heavily fragmented which means even the allocation step may well start taking time proportional to some log of N. So it might even get up toO(N squared log N). Nasty! Change the code to write each string field independently (i.e. avoid concatenations) and the algorithm will run much faster and still offer text output. Some buffering on the TFileStream may help as well to avoid many small writes but the OS should do a fair job of that for you. TTFN, Paul.
Re: [DUG]: File Export Speed
Message - Original Message - From: Paul Heinz Sent: Thursday, August 08, 2002 6:15 PM Subject: RE: [DUG]: File Export Speed Corey wrote: - Original Message - From: Myles Penlington Sent: Wednesday, August 07, 2002 10:20 AM Subject: RE: [DUG]: File Export Speed This string concatenation will be very slow - it is a N squared algorithm for the number of bytes copied ie bad news. Not quite that bad. AFAIK Strings allocate memory a block at a time... but it's still pretty bad. I wrote a program that passed Strings down a recursive tree search, then rewrote it using PChars and got a major speed increase... run time went from an average of 2 minutes to a little over 18 seconds. Definitely worth the extra coding effort. Yes, it is an O(N squared) algorithm since each string concatenation will require an extension which means allocating a new bigger string and copying the result over. Copying the string will take an amount of time proportional to the current length (a function of N) and this will be done a number of times that is a function of N. Hence, overall O(N squared) where N is Rows * Fields. Seems I was wrong. I stepped through the asm code in System.pas, and it does indeed reallocate the string's memory every time you add to it. If the string happens to be in a space it can grow into the memory management simply extends the allocated buffer, otherwise it will allocate a new buffer and copy the contents of the string to it then append the new string. So it has a non-predictive order approaching O(N^2), or possibly O(N^2log(N)) for extreme memory fragmentation. I think perhaps I was getting confused with TMemoryStream, which does allocate (in BCB4 at least) in blocks of 8k. Change the code to write each string field independently (i.e. avoid concatenations) and the algorithm will run much faster and still offer text output. Some buffering on the TFileStream may help as well to avoid many small writes but the OS should do a fair job of that for you. I agree. String concatenation is not required in this case, and just wastes time. Writing directly to the stream, with or without a buffer of some sort, should be significantly faster. -- Corey Murtagh The Electric Monk Quidquid latine dictum sit, altum viditur! --- 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/
Re: [DUG]: File properties
I have a unit that may be of interest. What's your email address and I'll forward it on (it's a bit big to post on the users group). - Original Message - From: Robert Martin To: Multiple recipients of list delphi Sent: Tuesday, October 23, 2001 12:11 PM Subject: [DUG]: File properties Not sure if ive asked this before or not but.. Does anyone have some code that reads a files properties (name / subject etc). Robert MartinSoftware EngineerWild Software Ltd
RE: [DUG]: File Association
Hi. Well I knew I had to limit the app. to running once...that was obvious, I just wasnt sure about HOW to do the rest of it. Anyways, on Seans advise, I did a search and found a component called MainInstance. IT does the job just nicely ! Thanks, Jeremy Coulter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Sean Cross Sent: Monday, 20 August 2001 18:29 To: Multiple recipients of list delphi Subject: RE: [DUG]: File Association YOu could look for one of the many components that limit the number of instance of your app. Most have the facility to pass the command line onto the already running instance. Sean -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jeremy Coulter Sent: Monday, 20 August 2001 6:03 p.m. To: Multiple recipients of list delphi Subject: RE: [DUG]: File Association yip home nowcan do a search. Thanks, Jeremy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Myles Penlington Sent: Monday, 20 August 2001 17:54 To: Multiple recipients of list delphi Subject: RE: [DUG]: File Association Sorry - out of luck, not any more - used to have one. Suggest have a look on DSP etc for something. Maybe the gexperts stuff has an example. Myles. -Original Message- From: vss [mailto:[EMAIL PROTECTED]] Sent: Monday, 20 August 2001 4:42 p.m. To: Multiple recipients of list delphi Subject: RE: [DUG]: File Association ah...you got an example ? :) Jeremy -Original Message- From: Myles Penlington [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Date: Mon, 20 Aug 2001 15:35:01 +1200 Subject: RE: [DUG]: File Association There are 2 ways. 1. DDE 2. Create a OS Event/Mutex/Semaphore and some Shared memory, when the second version starts, get the file name, fire the event and place the file name in the shared memory for the first instance of your application to read. Your main app then reads then responds to the event and reads the shared memory. Myles. -Original Message- From: vss [mailto:[EMAIL PROTECTED]] Sent: Monday, 20 August 2001 3:33 p.m. To: Multiple recipients of list delphi Subject: [DUG]: File Association Hi all. I have made it so an application that can open files that I have assoiated to it via explorer etc. The problem IS, that if I open one, thats fine, BUT if I open another, it opens another instance of my app. when I really only want it to open the next file in the same instance of the currently open app..if you get what I mean. Anyone know how I can fix this ? Cheers, Jeremy COulter --- 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/ --- 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/ --- 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/ --- 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
RE: [DUG]: File Association
There are 2 ways. 1. DDE 2. Create a OS Event/Mutex/Semaphore and some Shared memory, when the second version starts, get the file name, fire the event and place the file name in the shared memory for the first instance of your application to read. Your main app then reads then responds to the event and reads the shared memory. Myles. -Original Message- From: vss [mailto:[EMAIL PROTECTED]] Sent: Monday, 20 August 2001 3:33 p.m. To: Multiple recipients of list delphi Subject: [DUG]: File Association Hi all. I have made it so an application that can open files that I have assoiated to it via explorer etc. The problem IS, that if I open one, thats fine, BUT if I open another, it opens another instance of my app. when I really only want it to open the next file in the same instance of the currently open app..if you get what I mean. Anyone know how I can fix this ? Cheers, Jeremy COulter --- 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/
RE: [DUG]: File Association
ah...you got an example ? :) Jeremy -Original Message- From: Myles Penlington [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Date: Mon, 20 Aug 2001 15:35:01 +1200 Subject: RE: [DUG]: File Association There are 2 ways. 1. DDE 2. Create a OS Event/Mutex/Semaphore and some Shared memory, when the second version starts, get the file name, fire the event and place the file name in the shared memory for the first instance of your application to read. Your main app then reads then responds to the event and reads the shared memory. Myles. -Original Message- From: vss [mailto:[EMAIL PROTECTED]] Sent: Monday, 20 August 2001 3:33 p.m. To: Multiple recipients of list delphi Subject: [DUG]: File Association Hi all. I have made it so an application that can open files that I have assoiated to it via explorer etc. The problem IS, that if I open one, thats fine, BUT if I open another, it opens another instance of my app. when I really only want it to open the next file in the same instance of the currently open app..if you get what I mean. Anyone know how I can fix this ? Cheers, Jeremy COulter --- 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/ --- 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/
RE: [DUG]: File Association
Sorry - out of luck, not any more - used to have one. Suggest have a look on DSP etc for something. Maybe the gexperts stuff has an example. Myles. -Original Message- From: vss [mailto:[EMAIL PROTECTED]] Sent: Monday, 20 August 2001 4:42 p.m. To: Multiple recipients of list delphi Subject: RE: [DUG]: File Association ah...you got an example ? :) Jeremy -Original Message- From: Myles Penlington [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Date: Mon, 20 Aug 2001 15:35:01 +1200 Subject: RE: [DUG]: File Association There are 2 ways. 1. DDE 2. Create a OS Event/Mutex/Semaphore and some Shared memory, when the second version starts, get the file name, fire the event and place the file name in the shared memory for the first instance of your application to read. Your main app then reads then responds to the event and reads the shared memory. Myles. -Original Message- From: vss [mailto:[EMAIL PROTECTED]] Sent: Monday, 20 August 2001 3:33 p.m. To: Multiple recipients of list delphi Subject: [DUG]: File Association Hi all. I have made it so an application that can open files that I have assoiated to it via explorer etc. The problem IS, that if I open one, thats fine, BUT if I open another, it opens another instance of my app. when I really only want it to open the next file in the same instance of the currently open app..if you get what I mean. Anyone know how I can fix this ? Cheers, Jeremy COulter --- 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/ --- 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/
RE: [DUG]: File Association
yip home nowcan do a search. Thanks, Jeremy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Myles Penlington Sent: Monday, 20 August 2001 17:54 To: Multiple recipients of list delphi Subject: RE: [DUG]: File Association Sorry - out of luck, not any more - used to have one. Suggest have a look on DSP etc for something. Maybe the gexperts stuff has an example. Myles. -Original Message- From: vss [mailto:[EMAIL PROTECTED]] Sent: Monday, 20 August 2001 4:42 p.m. To: Multiple recipients of list delphi Subject: RE: [DUG]: File Association ah...you got an example ? :) Jeremy -Original Message- From: Myles Penlington [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Date: Mon, 20 Aug 2001 15:35:01 +1200 Subject: RE: [DUG]: File Association There are 2 ways. 1. DDE 2. Create a OS Event/Mutex/Semaphore and some Shared memory, when the second version starts, get the file name, fire the event and place the file name in the shared memory for the first instance of your application to read. Your main app then reads then responds to the event and reads the shared memory. Myles. -Original Message- From: vss [mailto:[EMAIL PROTECTED]] Sent: Monday, 20 August 2001 3:33 p.m. To: Multiple recipients of list delphi Subject: [DUG]: File Association Hi all. I have made it so an application that can open files that I have assoiated to it via explorer etc. The problem IS, that if I open one, thats fine, BUT if I open another, it opens another instance of my app. when I really only want it to open the next file in the same instance of the currently open app..if you get what I mean. Anyone know how I can fix this ? Cheers, Jeremy COulter --- 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/ --- 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/ --- 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/
RE: [DUG]: File Association
YOu could look for one of the many components that limit the number of instance of your app. Most have the facility to pass the command line onto the already running instance. Sean -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jeremy Coulter Sent: Monday, 20 August 2001 6:03 p.m. To: Multiple recipients of list delphi Subject: RE: [DUG]: File Association yip home nowcan do a search. Thanks, Jeremy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Myles Penlington Sent: Monday, 20 August 2001 17:54 To: Multiple recipients of list delphi Subject: RE: [DUG]: File Association Sorry - out of luck, not any more - used to have one. Suggest have a look on DSP etc for something. Maybe the gexperts stuff has an example. Myles. -Original Message- From: vss [mailto:[EMAIL PROTECTED]] Sent: Monday, 20 August 2001 4:42 p.m. To: Multiple recipients of list delphi Subject: RE: [DUG]: File Association ah...you got an example ? :) Jeremy -Original Message- From: Myles Penlington [EMAIL PROTECTED] To: Multiple recipients of list delphi [EMAIL PROTECTED] Date: Mon, 20 Aug 2001 15:35:01 +1200 Subject: RE: [DUG]: File Association There are 2 ways. 1. DDE 2. Create a OS Event/Mutex/Semaphore and some Shared memory, when the second version starts, get the file name, fire the event and place the file name in the shared memory for the first instance of your application to read. Your main app then reads then responds to the event and reads the shared memory. Myles. -Original Message- From: vss [mailto:[EMAIL PROTECTED]] Sent: Monday, 20 August 2001 3:33 p.m. To: Multiple recipients of list delphi Subject: [DUG]: File Association Hi all. I have made it so an application that can open files that I have assoiated to it via explorer etc. The problem IS, that if I open one, thats fine, BUT if I open another, it opens another instance of my app. when I really only want it to open the next file in the same instance of the currently open app..if you get what I mean. Anyone know how I can fix this ? Cheers, Jeremy COulter --- 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/ --- 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/ --- 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/
[DUG]: File security on Windows 2000 server.
I am doing the following: Using the Active Directory Services Interface (ADSI) I create a user (lests name the user "fred"). I then want to give a particular group (lets say "NearlyAdmins") fullcontrol of freds Documents and settings path (C:\Documents and Settings\fred). The person who is adding the new user is part of NearlyAdmins, andhas permission to do stuff to user accounts in a particular Organisational Unit, but does not have any access toother users folders. To do this I am using TNTFileSecurity which has a property called LogOnAs which is supposed to log onto the server using the given username and password and do its stuff, but this does notappear to be working correctly. Has anybody used TNTFileSecurity before? Any other suggestions of how to do this? Stacey Verner Ph: +64-9-4154790Software Developer Fax: +64-9-4154791 DDI: +64-9-4154797CJN Technologies Ltd. Email: [EMAIL PROTECTED]PO Box 302-278, North Harbour, Auckland, New Zealand12 Piermark Drive, North Harbour Estate, Auckland, NZVisit our website at http://www.cjntech.co.nz/
[DUG]: file in use?
How do I go about finding out if a file is in use? Matt. --- 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"
Re: [DUG]: file in use?
Novice's way: Try deleting a file :-) Sandeep --- 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"
Re: [DUG]: file in use?
On Wed, 6 Dec 2000, Sandeep wrote: Novice's way: Try deleting a file :-) Safe way - try open it for writing :) -- "We don't guarantee anything except that it will take up disk space..." Apache 2.0alpha5 Disclaimer Now Playing: no audio cd present --- 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"
RE: [DUG]: file in use?
Try opening it read only, exclusive (ShareDenyAll). Also there are API calls that will tell you if a file has been modified etc (callbacks) - Don't know what they are. Myles. -Original Message- From: Mark Derricutt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 06, 2000 3:48 PM To: Multiple recipients of list delphi Subject: Re: [DUG]: file in use? On Wed, 6 Dec 2000, Sandeep wrote: Novice's way: Try deleting a file :-) Safe way - try open it for writing :) -- "We don't guarantee anything except that it will take up disk space..." Apache 2.0alpha5 Disclaimer Now Playing: no audio cd present -- - 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" --- 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"
[DUG]: file option in windows.
Can anyone give me examples on how to add a file option to windows. e.g. right click on a directory and have the option compress there like winzip does? I would like to add something to both directories and all files. Cheers, Matt. --- 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"
RE: [DUG]: file option in windows.
See Demos\ActiveX\ShellExt -Original Message- From: Matthew Comb [mailto:[EMAIL PROTECTED]] Sent: Monday, November 27, 2000 2:45 PM To: Multiple recipients of list delphi Subject: [DUG]: file option in windows. Can anyone give me examples on how to add a file option to windows. e.g. right click on a directory and have the option compress there like winzip does? I would like to add something to both directories and all files. Cheers, Matt. -- - 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" --- 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"
[DUG]: File Open Dialog
I need a File Open Dialog with the normal Filter facilities where I can prevent the user from browsing all over the hard disk - access must be restricted to the InitialDir and its children. Any ideas? == Tom Munro Glass ++ | E-mail:| | Internet: [EMAIL PROTECTED] | | Web sites: | | TMG CONSULTANCY:http://www.tmgcon.com | | Tewkesbury Web: http://www.tmgcon.com/tewksweb | ++ --- 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"
[DUG]: File type association sample code wanted
Good morning, I'm sure many have done this in delphi in the past, if you have a sample code handy that I can borrow, then I don't need to go over the exercise again, at least not starting from "begin...end". Thanks in advance! Cheng --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
Re: [DUG]: File Locking
I have a thorny problem. I am wanting to open a file but before I do I need information about that file. I need to know the following: Does anyone else have the file open? Do they have that file opened exlusively? I need to be able to answer these two questions BEFORE I try to open the file. In otherwords I can't try opening the file as a test of these conditions. Any Ideas? I'm stumped. umm shouldn't you be able to do a try FS := TFileStream.Create(...); except // catch the exception if the file was already open end; Short of some API searching I'd guess the easiest way to identify if they have exclusive open is to try to open it with sharing. If you need to use the file exclusively then open with no file sharing. -- Aaron@home --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
RE: [DUG]: File browser
Fortunately MS have paid then 100 Extremely large ones to ship the new version with D5. Max -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Patrick Dunford Sent: Sunday, 27 June 1999 15:13 To: Multiple recipients of list delphi Subject: RE: [DUG]: File browser -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Alistair George Sent: Sunday, 27 June 1999 14:28 To: Multiple recipients of list delphi Subject: [DUG]: File browser Hugh? my Win32s.hlp must be out of date - it says SHBrowseForFolder:'new Windows 95' that, and the parameters are both 95 specific. Thanks, I will look at it again. Hopefully my help IS out of date. If you are wrong, pse get back to me. It has to be 95/98/NT compliant Unfortunately Borland keeps shipping old SDK files with Delphi. The NT referrred to may be NT3.51 Patrick Dunford, Christchurch, NZ http://patrick.dunford.com/ http://www.trainweb.org/enzedrail/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
RE: [DUG]: File browser
You can't do this because it's not the right way of doing it... the open file dialogs are for opening files. If you want to select a directory, what's wrong with using SHBrowseForFolder? Wade Auchterlonie mailto:[EMAIL PROTECTED] | -Original Message- | Behalf Of Alistair George | | I also want to use the | OpenPic dialog[ue] to set up a users default directory. I currently | do this by forcing them to select a file, but this is not good enough. I | would like the OpenPic browser to accept the OK button being pressed for a null | file entry. --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
[DUG]: File browser
Thanks Wade, but thats Win 95 specific. If you want to select a directory, what's wrong with using SHBrowseForFolder? The following works, and doesnt use another component, but I HATE using Cancel!: procedure TCamForm.SetDIR1Click(Sender: TObject); begin setdir1.Tag := 1; {use the tag for a global switch} Openpic1.Title := 'Select Directory, Then press CANCEL button'; OpenPic1.Execute; end; procedure TCamForm.OpenPic1Close(Sender: TObject); begin if setdir1.Tag = 1 then begin setdir1.Tag := 0; Openpic1.Title := 'Open'; r.WriteString('iDIR', openpic1.InitialDir); end; {then in formcreate, to get the stored iDIR} try r.ReadString('iDIR'); openpic1.InitialDir := r.ReadString('iDIR'); savepic1.InitialDir := openpic1.InitialDir; except r.WriteString('iDIR', openpic1.InitialDir); end; --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
RE: [DUG]: File browser
| Thanks Wade, but thats Win 95 specific. | If you want to select a directory, what's wrong with using | SHBrowseForFolder? Actually it is Win95, win98, NT4.0 and NT5.0 specific. You won't find it in Windows 3.1 or earlier. Which platform are you targeting? --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
RE: [DUG]: File browser
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Alistair George Sent: Sunday, 27 June 1999 13:36 To: Multiple recipients of list delphi Subject: [DUG]: File browser Thanks Wade, but thats Win 95 specific. Are you using Windows 3.1? ShBrowseForFolder is almost certainly supported by NT4 Check at MSDN snip Patrick Dunford, Christchurch, NZ http://patrick.dunford.com/ http://www.trainweb.org/enzedrail/ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
RE: [DUG]: File copying
Yes, the problem with the files that come with Delphi is that they refer to more than one version of NT, but I did get the impression at one point that they were not the most up to date files available. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Cooke, Andrew Sent: Friday, 11 June 1999 16:55 To: Multiple recipients of list delphi Subject: RE: [DUG]: File copying My Windows help file says "[Now supported on Windows NT]" and sure enough, it works on NT 4. Andrew Cooke snip --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
RE: [DUG]: File copying
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Rohit Gupta Sent: Friday, 11 June 1999 16:49 To: Multiple recipients of list delphi Subject: Re: [DUG]: File copying Peter, can you confirm that it works on NT 4 ? I was looking up the win32api.hlp that comes with D3. The one that says "Copyright © 1992-1995 Microsoft Corporation" on the first page? :( . snip --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
[DUG]: File copying
Whats the easiest way to copy files from delphi, execute s shell program ? write a copy FileObject that uses blockread/write ? I Have to do a whole stack of files and directories ?? Richard --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
Re: [DUG]: File copying
Quoting [EMAIL PROTECTED]: Whats the easiest way to copy files from delphi, execute s shell program ? write a copy FileObject that uses blockread/write ? I Have to do a whole stack of files and directories ?? look up ShFileOperation in the api help file It will copy subdirectories as well, and is very easy, shows a progress dialog, etc --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
Re: [DUG]: File copying
You can use CopyFile (winapi), which is what I have been using. But it is a pig - while copying the file, your app does not respond to anything for seconds. There is also MoveFile and DeleteFile. From memory there is a suite of routines in lzw unit which can uncompress the file as they copy. On 11 Jun 99 at 11:05, richard.r.huegill@centrelink. wrote: Whats the easiest way to copy files from delphi, execute s shell program ? write a copy FileObject that uses blockread/write ? I Have to do a whole stack of files and directories ?? Richard --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz Rohit == CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand PH(649) 489-2280 FX(649) 489-2290 email [EMAIL PROTECTED] or [EMAIL PROTECTED] == --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
RE: [DUG]: File copying
Basically you use shFileOperation(IpFileOp); There is a bit of work in this so if you Email me at [EMAIL PROTECTED], I'l send exactly what you want over the weekend. Cheers, Tony. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of [EMAIL PROTECTED] Sent: Friday, 11 June 1999 13:06 To: Multiple recipients of list delphi Subject: [DUG]: File copying Whats the easiest way to copy files from delphi, execute s shell program ? write a copy FileObject that uses blockread/write ? I Have to do a whole stack of files and directories ?? Richard --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
Re: [DUG]: File copying
Peter, It sounded too good, so I thought I would check it out so that I could use it. Unfortunately the dratted thing does not work under winnt - thats what the online help says anyway. :-( Richard, beware, before you use it. :-) Rohit == CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand PH(649) 489-2280 FX(649) 489-2290 email [EMAIL PROTECTED] or [EMAIL PROTECTED] == --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
Re: [DUG]: File copying
Quoting Rohit Gupta [EMAIL PROTECTED]: Peter, It sounded too good, so I thought I would check it out so that I could use it. Unfortunately the dratted thing does not work under winnt - thats what the online help says anyway. :-( The online help might be referring to winnt 3.5x using the old shell\ snip --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
RE: [DUG]: File copying
Here's a function we've used... function MyCopyFile(Source, Dest: string): Integer; { This procedure is a modified version of the CopyFile procedure published in } { Borland's Delphi Developer's Guide (p.777-780). } var SourceHand, DestHand: Integer; PSource, PDest: PChar; ASource: array[0..500] of Char; ADest: array[0..500] of Char; OpenBuf: TOFStruct; begin Result := 0; PSource := @ASource[0]; PDest := @ADest[0]; StrPCopy(PSource, Source); StrPCopy(PDest, Dest); { Open source file and pass the filename } SourceHand := LZOpenFile(PSource, OpenBuf, of_Share_Deny_Write or of_Read); { raise an exception on error } if Sourcehand -1 then begin { Open destination file and pass the filename } DestHand := LZOpenFile(@Dest[1], OpenBuf, of_Share_Exclusive or of_Write or of_Create); { Check for error (copy the file if no error) } if DestHand -1 then try LZCopy(SourceHand, DestHand); except Result := -1; end else Result := -1; LZClose(DestHand); end else Result := -1; { whether or not an error occurs, we need to close the files } LZClose(SourceHand); end; Cheers. BJ... -- From: [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]] Reply To: [EMAIL PROTECTED] Sent: Friday, 11 June 1999 13:05 To: Multiple recipients of list delphi Subject:[DUG]: File copying Whats the easiest way to copy files from delphi, execute s shell program ? write a copy FileObject that uses blockread/write ? I Have to do a whole stack of files and directories ?? Richard --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
Re: [DUG]: File copying
Peter, can you confirm that it works on NT 4 ? I was looking up the win32api.hlp that comes with D3. On 11 Jun 99 at 16:14, [EMAIL PROTECTED] wrote: Quoting Rohit Gupta [EMAIL PROTECTED]: Peter, It sounded too good, so I thought I would check it out so that I could use it. Unfortunately the dratted thing does not work under winnt - thats what the online help says anyway. :-( The online help might be referring to winnt 3.5x using the old shell\ Rohit == CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand PH(649) 489-2280 FX(649) 489-2290 email [EMAIL PROTECTED] or [EMAIL PROTECTED] == --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
RE: [DUG]: File copying
I Have to do a whole stack of files and directories ?? Richard I've been toying with the idea of making a freeware duplicator program which doesnt do a diskcopy as such, which slows replication down. There is a whole heap of stuff: http://sunsite.icm.edu.pl/delphi/ One Ive picked up looks interesting: 'TFileCopy is a component designed for very fast copy of files without external, coarse calls involving the O.S. Furthermore it provides to send to the calling form (by the API SendMessage)' More of interest to me is the ability to change the stepping rate which can be adjusted to speed up disk i/o considerably. I'm not sure if this is being used in TFileCopy. Regards, Alistair+ --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
RE: [DUG]: File copying
My Windows help file says "[Now supported on Windows NT]" and sure enough, it works on NT 4. Andrew Cooke -Original Message- From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] Sent: Saturday, June 12, 1999 4:49 AM To: Multiple recipients of list delphi Subject: Re: [DUG]: File copying Peter, can you confirm that it works on NT 4 ? I was looking up the win32api.hlp that comes with D3. On 11 Jun 99 at 16:14, [EMAIL PROTECTED] wrote: Quoting Rohit Gupta [EMAIL PROTECTED]: Peter, It sounded too good, so I thought I would check it out so that I could use it. Unfortunately the dratted thing does not work under winnt - thats what the online help says anyway. :-( The online help might be referring to winnt 3.5x using the old shell\ Rohit --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
Re: [DUG]: FILE of ....
Further to that, beware that old names are now property names such as Text, Assign, Close. New ones exist to replace them to clarify for the compiler such as AssignFile CloseFile. Else use System.Assign (I think). On 26 Feb 99 at 9:30, Siegfried Kirchmair wrote: Hi, I noticed that in d4 you can't compile a typed file declaration any more - gone or the syntax has changed??? The help file still shows the "old" syntax. example: type TFileRec = record time : string; . end; var myFile : file of TFilerec; - doesn't compile. Has anyone a clue if this doesn't work at all any more or if there is a better way of doing it now??? thanks sigi CACTUS Ltd., Nelson Phone:03-5479383 Fax:03-5479329 E-Mail [EMAIL PROTECTED] http://www.TheShop.co.nz http://www.CharterGuide.co.nz --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz Rohit == CFL - Computer Fanatics Ltd. 21 Barry's Point Road, AKL, New Zealand PH(649) 489-2280 FX(649) 489-2290 email [EMAIL PROTECTED] or [EMAIL PROTECTED] == --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
Re: [DUG]: FILE of ....
Hi Wilfred, Change your compiler options to use shortstrings by default, or explicitly declare the size of the string, or change the type of the time variable to "shortstring" instead i.e. To change the compiler option does not seem to work, while defining the string size works fine. thanks for your help sigi Sigi Silvia from Nelson Organic Products Site: http://www.BioGrains.co.nz No credit card is required for orders within New Zealand. --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
[DUG]: File compress
Hi folks, I wonder if anyone has an idea how to compress an archive file in delphi. I want to compress the output file of my application before saving it on the hard drive. I appreciate any help. Algawi --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz
Re: [DUG]: File compress
There is a third and forth step - download it and buy it. Unless you NEED .ZIP compatability, its about the best there is, IMO - and its REALLY easy to use, especially if you are familiar with streams. N Patrick Dunford wrote: Go to www.spis.co.nz Look up TCompress -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of M Algawi Sent: Sunday, 27 December 1998 15:04 To: Multiple recipients of list delphi Subject: [DUG]: File compress Hi folks, I wonder if anyone has an idea how to compress an archive file in delphi. I want to compress the output file of my application before saving it on the hard drive. I appreciate any help. Algawi -- - New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz --- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz