Project JEDI - Issue Tracker - JEDI VCL
Viewing Issue Advanced Details
4560 00 JVCL Components major always 2008-10-31 12:00 2008-11-01 14:44
Prozac Windows  
AHUser Vista  
normal Utlimate  
resolved Daily / GIT  
none 3.36  
0004560: JclAppInst - incorrect CMD strings

Today I've downloaded the latest revision of JclAppInst.pas 2523 since the one included in official JCL 3110 caused serious exceptions.
JclAppInst.pas 2523 seems to work fine except parsing command line params.
Command line parameters are incorrectly received.
There are probably some string encoding problems. The strings are incomplete and sometimes contain strange chcracters.
In my application I always pass input file paths as a command line parameters so the issue is in this case really serious and that's why I decided to report it here.
Try to use the following:
procedure TMain_Form.JvAppInstances1CmdLineReceived(Sender: TObject; CmdLine: TStrings);
  if CmdLine.Count > 0 then
zip file icon [^] (269,087 bytes) 2008-11-01 03:40
Issue History
2008-10-31 12:00 Prozac New Issue
2008-10-31 12:09 jfudickar Note Added: 0014936
2008-11-01 03:40 Prozac Note Added: 0014938
2008-11-01 03:40 Prozac File Added:
2008-11-01 03:41 Prozac Issue Monitored: Prozac
2008-11-01 14:43 AHUser Status new => resolved
2008-11-01 14:43 AHUser Fixed in Version => Daily / SVN
2008-11-01 14:43 AHUser Resolution open => fixed
2008-11-01 14:43 AHUser Assigned To => AHUser
2008-11-01 14:43 AHUser Note Added: 0014941

2008-10-31 12:09   
Please create a small sample for this.
2008-11-01 03:40   
Hi jfudickar and thanks for your response.
Here is my sample uploaded.

How to use:
- Run JvAppInstances_CMD.exe (and do not close this instance).
- Open CMD and navigate to JvAppInstances_CMD directory.
- Run another instance of the executable via CMD with one long parameter, i.e.:
JvAppInstances_CMD.exe "This is my cmd parameter as a sample for this jcl control"
2008-11-01 14:43   
Fixed in JCL SVN.

The WM_COPYDATA parameter cbData was used as "Length" for strings. But Windows doesn't know that we transfer UTF16 strings and only allocates "cbData" Bytes. This caused a truncation of the strings.