Ohk you are right, a normal exe always works as you think.. but as per the original question, "the application is running on windows network", so i was talking about the "server application", to which any one can access through the LAN. so my view was about a server application. and m sure it will work, try it using a "DCOM" server application and let me knw whats hapning... ;)
--- In [email protected], "anomander1" <[EMAIL PROTECTED]> wrote: > > --- In [email protected], "iqbal_delphidev" > <iqbal_delphidev@> wrote: > > > > You may count the number of time your exe have been run. > > Actually your exe make new instance evry time it runs, so you can > > not > > make any global variable to count the users who have executed your > > exe. > > > > But using a trick you can count the number of users who have > > executed... > > To do this just declare a global variable suppose > > > > GlobalCount: Variant; > > > > then use a function lets say > > > > function AddUserCount: Variant; > > > > and in the boday of function u can use the trick > > > > begin > > if GlobalCount = Nil then GlobalCount := 0; > > Result := GlobalCount + 1; > > end; > > > > so using the above trick u may count the number of instances. > > but its might not be the real time instance, I think now you will be > > able to do your need... > > > > Please explain this, because to me this can never work. > You are using a Local variable in the program and that can only work > for one usage of the EXE file. > When you start the first instance, you get the value 0 for GlobalCount. > When you start the second instance, you ALSO get the value 0 for > GlobalCount. > Because, both programs do NOT interact with each other. >

