View Issue Details

IDProjectCategoryView StatusLast Update
0005970JEDI VCL00 JVCL Componentspublic2015-09-21 17:47
Reporterjediuser9999Assigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.45 
Target VersionFixed in Version3.49 
Summary0005970: JvAppInstance component doesnt work proper
Descriptionin the jvcl dir, choose the example project for AppInstance-component.
-Set appinstancecount to 1.
-Compile.
-Copy the exe to three different dirs.
-You can start all the exes without problems.
-Starting a second instance from a exe in one dir is beeing blocked by the
component correctly.

Win7/64
TagsNo tags attached.

Activities

jediuser9999

2012-08-28 17:45

reporter   ~0020130

Delphi 2010

outchy

2012-08-28 19:23

administrator   ~0020131

This has always been the case. But you can specify an explicit application identifier by modifying the following function in jvcl/run/JvAppInstances.pas:

function TJvAppInstances.GetAppInstances: TJclAppInstances;
begin
  if csDesigning in ComponentState then
    Result := nil
  else
    Result := JclAppInstances(your application id here); // create AppInstance
end;

Then you need to recompile the JVCL.

An other alternative is not to use an instance of TJvAppInstance but to use JCL code directly. Basically you just need to add the following line as the first line of the project entry point (.dpr):

JclAppInstances(your application id here).CheckSingleInstance;

By doing this, you will have more control on how to count the instances (global, per user, per session).

obones

2013-12-13 15:18

administrator   ~0020827

Use SetUniqueAppId before creating any TJvAppInstances component and you'll be able to achieve what you want.

Issue History

Date Modified Username Field Change
2012-08-28 17:44 jediuser9999 New Issue
2012-08-28 17:45 jediuser9999 Note Added: 0020130
2012-08-28 19:23 outchy Note Added: 0020131
2013-01-15 15:24 obones Status new => acknowledged
2013-12-13 15:18 obones Note Added: 0020827
2013-12-13 15:18 obones Status acknowledged => resolved
2013-12-13 15:18 obones Fixed in Version => Daily / GIT
2013-12-13 15:18 obones Resolution open => fixed
2013-12-13 15:18 obones Assigned To => obones
2015-09-21 17:47 obones Fixed in Version Daily / GIT => 3.49