Board index » cppbuilder » Big Big Problem i don′t know if this is the best news.. to post it but

Big Big Problem i don′t know if this is the best news.. to post it but

it is like this hi have this app that i run like Admin (winxp) then i change
to other user... but the other user can kill it at task manager Application
tab.... easely... but at the processes tab it says that it is imposible...
anyway is there any way to take it out from the application tab? just have
it only at proceses?
or how can i put my app as a service?

please help...

i realy need this..

--Ricardo

 

Re:Big Big Problem i don′t know if this is the best news.. to post it but


On Sun, 19 Jan 2003 15:01:36 -0000, "Ricardo Rodrigues"

Quote
<madi...@cadaval.net> wrote:
>it is like this hi have this app that i run like Admin (winxp) then i change
>to other user... but the other user can kill it at task manager Application
>tab.... easely... but at the processes tab it says that it is imposible...

restrict the user security policy..you can make it to not have the
permissions to kill the program
Quote
>anyway is there any way to take it out from the application tab? just have
>it only at proceses?

so an invisible app??
you should use the api "RegisterServiceProcess"

Quote
>or how can i put my app as a service?

if you mean start it when windows starts you can put the application
in a particular key of the registry..
I dont know if on winxp this changes but usually is:
hkey_local_machine\software\microsoft\windows\currentversion\run
check it with regedit..if you find programs that are services in that
key it means that the key is right..
hope this helps!!
Quote

>please help...

>i realy need this..

>--Ricardo

Re:Big Big Problem i don′t know if this is the best news.. to post it but


Hi Remy,

remember the below code you post to me,
I compiled it on several machines but when I start
the function I always get a "0" why ??

I changed the Kilometer values but still "0"...

heres the code:

    int Means = 0;
    TStringList *sl = new TStringList;

    sl->CommaText = "Frankfurt 56 km, Munich 453 km, Bremen 338 km, Berlin
488 km";

    for(int x = 0; x < sl->Count; x++)
    {
        AnsiString str = sl->Strings[x].Trim();
        int pos = str.LastDelimiter("0123456789");
        if( pos != 0 )
        {
            str.SetLength(pos);
            pos = str.LastDelimiter(" ");
            if( pos != 0 )
                Means += str.SubString(pos+1, str.Length()).ToIntDef(0);
        }
    }

    ShowMessage(Means);
    delete sl;

Can you help me with this...?

Oren

Re:Big Big Problem i don′t know if this is the best news.. to post it but


Hi Oren,
Replace
 if( pos != 0 )
    Means += str.SubString(pos+1, str.Length()).ToIntDef(0);
with
 if( pos == 0 )
    Means += str.SubString(pos+1, str.Length()).ToIntDef(0);

Kasper

"Oren (Halvani.de)" <neroni...@gmx.de> skrev i en meddelelse
news:3e2b20d4@newsgroups.borland.com...

Quote
> Hi Remy,

> remember the below code you post to me,
> I compiled it on several machines but when I start
> the function I always get a "0" why ??

> I changed the Kilometer values but still "0"...

> heres the code:

>     int Means = 0;
>     TStringList *sl = new TStringList;

>     sl->CommaText = "Frankfurt 56 km, Munich 453 km, Bremen 338 km, Berlin
> 488 km";

>     for(int x = 0; x < sl->Count; x++)
>     {
>         AnsiString str = sl->Strings[x].Trim();
>         int pos = str.LastDelimiter("0123456789");
>         if( pos != 0 )
>         {
>             str.SetLength(pos);
>             pos = str.LastDelimiter(" ");
>             if( pos != 0 )
>                 Means += str.SubString(pos+1, str.Length()).ToIntDef(0);
>         }
>     }

>     ShowMessage(Means);
>     delete sl;

> Can you help me with this...?

> Oren

Re:Big Big Problem i don′t know if this is the best news.. to post it but


Quote
"Oren \(Halvani.de\)" <neroni...@gmx.de> wrote:
>Hi Remy,

>remember the below code you post to me,

[snip]

Hi Oren, getting the numbers can be done much easier, because
a TStringList is able to split your String (funny, I learned
this from Remy!). Please see my answer to your original post.

Re:Big Big Problem i don′t know if this is the best news.. to post it but


No

Gambit

Quote
"Ricardo Rodrigues" <madi...@cadaval.net> wrote in message

news:3e2b11c7$1@newsgroups.borland.com...
Quote
> does RegisterServiceProcess runs on winXp ?

Re:Big Big Problem i don′t know if this is the best news.. to post it but


Services are different from normal executables.  You'd have to recreate your
project from scratch, using the "File menu > New > Service Application"
option instead.

The alternative is there are secondary programs available, such as
Microsoft's SRVANY utility availalbe on the NT resource kit, that can run
executables like services.

Gambit

Quote
"Ricardo Rodrigues" <madi...@cadaval.net> wrote in message

news:3e2abfe0@newsgroups.borland.com...
Quote
> or how can i put my app as a service?

Re:Big Big Problem i don′t know if this is the best news.. to post it but


RegisterServiceProcess() is only available under Win9x/Me, not XP, which
Ricardo is actually using.

Gambit

Quote
"TheSomberlain" <moloch...@freemail.it> wrote in message

news:j0rl2vk5usr8vjk54nferqh2j87du3ggf6@4ax.com...
Quote
> you should use the api "RegisterServiceProcess"

Other Threads