Click here to get back home

How to kill/stop process for Mobile 5.0 Smartphone

 HomeNewsGroups | Search | About
 microsoft.public.smartphone    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
How to kill/stop process for Mobile 5.0 Smartphone winder 07-25-2006
Posted by winder on July 25, 2006, 5:12 am
Please log in for more thread options
Hi everybody,

I have written a program for Mobile 5.0 Smartphone, I want to kill the
specifically process, my code can work fine on Mobile2003 Smartphone, but
can not work fine on Mobile 5.0 Smartphone.

Why? Is the API on Mobile2003 Smartphone SDK is different from Mobile 5.0
Smartphone SDK? But why I can build successfuly?

Need your help!

Thanks,

winder



Posted by riki on July 25, 2006, 7:05 pm
Please log in for more thread options
winder wrote:
> I have written a program for Mobile 5.0 Smartphone, I want to kill the
> specifically process, my code can work fine on Mobile2003 Smartphone, but
> can not work fine on Mobile 5.0 Smartphone.
which process are you trying to kill?

> Why? Is the API on Mobile2003 Smartphone SDK is different from Mobile 5.0
> Smartphone SDK? But why I can build successfuly?
Which API are you trying to use?

riki

--
ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
AbstractStart for Smartphone :
http://homepages.inspire.net.nz/~gambit/AbstractStart/

The first rule of PATRIOT act is, you do not talk about PATRIOT act.--
metachor @ Slashdot (2004-05-13)

Posted by winder on July 25, 2006, 8:45 pm
Please log in for more thread options
Thanks for your attention.

My program is a task manager, it can kill each process on the device, my
program list all process, so i want to select one and kill it.
Is it need the privilege?

The follow is the code I written.
HANDLE hProcess = OpenProcess(NULL, FALSE, peProcess.th32ProcessID);
if (hProcess != NULL)
{
TerminateProcess(hProcess, 1);
CloseHandle(hProcess);
}

Thanks,

winder


> winder wrote:
>> I have written a program for Mobile 5.0 Smartphone, I want to kill the
>> specifically process, my code can work fine on Mobile2003 Smartphone, but
>> can not work fine on Mobile 5.0 Smartphone.
> which process are you trying to kill?
>
>> Why? Is the API on Mobile2003 Smartphone SDK is different from Mobile 5.0
>> Smartphone SDK? But why I can build successfuly?
> Which API are you trying to use?
>
> riki
>
> --
> ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
> AbstractStart for Smartphone :
> http://homepages.inspire.net.nz/~gambit/AbstractStart/
>
> The first rule of PATRIOT act is, you do not talk about PATRIOT act.--
> metachor @ Slashdot (2004-05-13)



Posted by riki on July 25, 2006, 10:18 pm
Please log in for more thread options
winder wrote:

> Is it need the privilege?
yes it does.


> The follow is the code I written.
> HANDLE hProcess = OpenProcess(NULL, FALSE, peProcess.th32ProcessID);
> if (hProcess != NULL)
> {
> TerminateProcess(hProcess, 1);
> CloseHandle(hProcess);
> }
you should check the return value of TerminateProcess(), if it returns 0
then check GetLastError()

riki

--
ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
AbstractStart for Smartphone :
http://homepages.inspire.net.nz/~gambit/AbstractStart/

What happens if a big asteroid hits Earth? Judging from realistic
simulations involving a sledge hammer and a common laboratory frog, we
can assume it will be pretty bad.-- Dave Barry

Posted by winder on July 25, 2006, 10:58 pm
Please log in for more thread options
riki

Thanks very much. It is solved.

Thanks again.

winder


> winder wrote:
>
>> Is it need the privilege?
> yes it does.
>
>
>> The follow is the code I written.
>> HANDLE hProcess = OpenProcess(NULL, FALSE, peProcess.th32ProcessID);
>> if (hProcess != NULL)
>> {
>> TerminateProcess(hProcess, 1);
>> CloseHandle(hProcess);
>> }
> you should check the return value of TerminateProcess(), if it returns 0
> then check GetLastError()
>
> riki
>
> --
> ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
> AbstractStart for Smartphone :
> http://homepages.inspire.net.nz/~gambit/AbstractStart/
>
> What happens if a big asteroid hits Earth? Judging from realistic
> simulations involving a sledge hammer and a common laboratory frog, we can
> assume it will be pretty bad.-- Dave Barry



Similar ThreadsPosted
Detecting CPU usage of a Process ... March 20, 2008, 10:11 pm
problem with kill process March 9, 2007, 12:16 am
Trend Micro Mobile Security 3.0 for Windows Mobile 5 (PocketPC and Smartphone) Beta Program September 27, 2006, 3:21 am
Windows Mobile on Smartphone June 6, 2005, 11:22 pm
Smartphone Mobile Blogging October 22, 2006, 1:07 pm
VPN set up for Windows mobile 6 smartphone June 29, 2007, 6:46 am
Whats new in windows mobile for smartphone December 30, 2005, 1:23 am
Windows Mobile 5 (smartphone) apps May 2, 2006, 12:20 pm
Green Mobile Smartphone 5.0 Theme? August 20, 2006, 11:43 am
mobile 5 smartphone - Juniper IVE - exchange January 15, 2007, 11:36 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap