View Issue Details

IDProjectCategoryView StatusLast Update
0004560JEDI VCL00 JVCL Componentspublic2008-11-01 14:44
ReporterProzacAssigned ToAHUser 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformWindowsOSVistaOS VersionUtlimate
Product VersionDaily / GIT 
Target VersionFixed in Version3.36 
Summary0004560: JclAppInst - incorrect CMD strings
DescriptionHi!

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.
Steps To ReproduceTry to use the following:
procedure TMain_Form.JvAppInstances1CmdLineReceived(Sender: TObject; CmdLine: TStrings);
begin
  if CmdLine.Count > 0 then
  ShowMessage(CmdLine[0]);
end;
TagsNo tags attached.

Activities

jfudickar

2008-10-31 12:09

developer   ~0014936

Please create a small sample for this.

Prozac

2008-11-01 03:40

reporter   ~0014938

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 03:40

 

JvAppInstances_CMD.zip (269,087 bytes)

AHUser

2008-11-01 14:43

developer   ~0014941

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.

Issue History

Date Modified Username Field Change
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: JvAppInstances_CMD.zip
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