[fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-23 Thread Luis - SoftSAT Sistemas
Try replacing// these errors seem to show up more if I select multiple files or // change directories.  Open_File.lpstrFile:=Pchar(Target_File+#0);with something likeMove(Target_File, Open_File.lpstrFile, Length(Target_File) + 1);  ___ fpc-pascal maillist

Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-23 Thread James Richters
Thank you very much for explaining all this!! I really don’t know what I would do without the helpful people here! I didn’t know there was something like IncludeTrailingPathDelimiter, wow that sure is useful! I have a LOT of places I need to make sure I stick in the trailing \ and this f

Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-23 Thread Santiago A.
El 23/05/19 a las 13:52, James Richters escribió: I have put together a program that demonstrates the issue I am having.  I have re-structured it a bit to try to make it more clear where the problem is. While putting this together, I was able to get it to run fine with no problems if I did

Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-23 Thread James Richters
Subject: Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA I did notice lpstrFilter is terminated by one #0 instead of two. Other than that not at a pc to test. -- Alexander Grotewohl http://dcclost.com On May 23, 2019 7:52 AM, James Richters mailto:ja...@productionautomation.net

Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-23 Thread Alexander Grotewohl
GrotewohlSent: Thursday, May 23, 2019 11:56 AMTo: FPC-Pascal users discussions Subject: Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA I did notice lpstrFilter is terminated by one #0 instead of two. Other than that not at a pc to test.--Alexander Grotewohlhttp://dcclost.com On May 23, 2019 7:52

Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-23 Thread James Richters
Grotewohl Sent: Thursday, May 23, 2019 11:56 AM To: FPC-Pascal users discussions Subject: Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA I did notice lpstrFilter is terminated by one #0 instead of two. Other than that not at a pc to test. -- Alexander Grotewohl http://dcclost.com

Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-23 Thread Alexander Grotewohl
I did notice lpstrFilter is terminated by one #0 instead of two. Other than that not at a pc to test.--Alexander Grotewohlhttp://dcclost.comOn May 23, 2019 7:52 AM, James Richters wrote:I have put together a program that demonstrates the issue I am having.  I have re-structured it a bit to try to

Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-23 Thread James Richters
I have put together a program that demonstrates the issue I am having. I have re-structured it a bit to try to make it more clear where the problem is. While putting this together, I was able to get it to run fine with no problems if I did not try to put GetOpenFileNameA back to the directory o

Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-22 Thread James Richters
a try. I'll put together the simplest example that demonstrates the issue. -Original Message- From: fpc-pascal On Behalf Of Santiago A. Sent: Wednesday, May 22, 2019 12:56 PM To: 'FPC-Pascal users discussions' Subject: Re: [fpc-pascal] Getting multiple files from GetOpe

Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-22 Thread Santiago A.
El 21/05/19 a las 23:17, James Richters escribió: I have it defined with the program variables: Here are all my Uses and Vars: Uses ptcgraph,sysutils,Windows,Commdlg,Classes,CRT; Var TFilename : TOpenFileNameA; ret: array[0..100] of char; OpenFileResult

Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-21 Thread James Richters
to manage tStringList James -Original Message- From: fpc-pascal On Behalf Of Cyrax Sent: Tuesday, May 21, 2019 4:55 PM To: fpc-pascal@lists.freepascal.org Subject: Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA On 21.5.2019 22.12, James Richters wrote: > This is the function I

Re: [fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-21 Thread Cyrax
On 21.5.2019 22.12, James Richters wrote: This is the function I came up with to use GetOpenFileNameA() to get multiple files, and put the file names all into a StringList. I think I am doing something fundamentally wrong here because I can run this in a loop sometimes 2 or 4 times, or sometim

[fpc-pascal] Getting multiple files from GetOpenFileNameA

2019-05-21 Thread James Richters
This is the function I came up with to use GetOpenFileNameA() to get multiple files, and put the file names all into a StringList. I think I am doing something fundamentally wrong here because I can run this in a loop sometimes 2 or 4 times, or sometimes 30 times, and it seems to work but event