Re: How to limit the number of instances of an application on a server?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi Phil,
the internal processlist dont crrelates with users,they enumerate all
running Processes on the mashine.
U can easy count the name of ur modulename, by comparisation the
processlistnames.

Te name of your Application u can find out on different ways:
char
Fname[MAX_PATH];GetModuleFileName(NULL,Fname,sizeof(Fname)/sizeof(Fname[0]));
or
LPCSTR pAppName=AfxGetApp()->m_pszAppName

try it in a console app.
greetings
Karsten Schulz



"Phil" <pbruyant@xxxxxxxxx> schrieb im Newsbeitrag
news:c988a1a7-1a25-46c3-839c-11d664814130@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On 9 juin, 13:56, "Karsten Schulz" <kahnp...@xxxxxxxxxx> wrote:
Hi Phil,

u can enumerate al running Processes easy,

greetings and Best Regards
Karsten Schulz

--www.kahnsoft.de

Thanks
Can this code find instances of the application when run by the other
users ?

-P


.



Relevant Pages

  • Re: Is an executable running?
    ... >know only file name and not its caption. ... You can enumerate the running processes and look for one with the ... particular exename. ...
    (microsoft.public.vb.general.discussion)
  • Re: Is an executable running?
    ... >know only file name and not its caption. ... You can enumerate the running processes and look for one with the ... particular exename. ...
    (microsoft.public.vb.winapi)
  • Re: how to dispaly the list of running applications on my ppc using c#
    ... simply enumerate all top-level windows. ... actually get *all* running processes, ... > simple form the liste of running programs on my pocket pc. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Is it running?
    ... Michael Hesse wrote: ... I believe you would have to enumerate all running processes and for each ... -- RFC 1925 ...
    (microsoft.public.vc.language)
  • Re: can I list/kill processes?
    ... If you have wmi installed (windows management instrumentation), ... "enumerate" the running processes, ...
    (microsoft.public.scripting.vbscript)