473,395 Members | 1,783 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

EndTask don't work

Hi
I'm using EnumWindows (User32.dll) function to get all currently open
windows and fill a ListView. Then I want to close the selected windows using
EndTask(IntPtr hwnd) or EndTask(IntPtr hwnd, bool fShutDown, bool fForce)
(User32.dll) but always return false and not close de window. Does anybody
know how to close a window having the HWND ?
I tryied first with CloseWindow but always return false too.

Thanks!!!
Dec 9 '05 #1
1 1775
Kevin,

Use DestroyWindows API instead. As you can read in MSDN EndTask is not meant
to be used.

MSDN:
"...However, this function is not intended for general use. It is
recommended that you do not use it in new programs because it might be
altered or unavailable in subsequent versions of Windows. ..."
--
HTH
Stoitcho Goutsev (100) [C# MVP]

"Kevin" <@> wrote in message news:uE**************@TK2MSFTNGP15.phx.gbl...
Hi
I'm using EnumWindows (User32.dll) function to get all currently open
windows and fill a ListView. Then I want to close the selected windows
using
EndTask(IntPtr hwnd) or EndTask(IntPtr hwnd, bool fShutDown, bool fForce)
(User32.dll) but always return false and not close de window. Does anybody
know how to close a window having the HWND ?
I tryied first with CloseWindow but always return false too.

Thanks!!!

Dec 9 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
3
by: Ken | last post by:
Any ideas anyone, using IIS 5.1 .ASP web pages do not work I get error 500, but .ASPX web pages work fine? I made a website using MS FrontPage 2000, then I added some .ASPX pages to the site that...
3
by: Douglas Buchanan | last post by:
Buttons don't work if form is opened on startup A2k If 'frmMain' is set to open by default at startup none of the buttons work. If 'frmMain' is opened from the database window then all the...
28
by: DFS | last post by:
I'm unfortunately about to change, or sever, a two-year relationship with a very slow-paying client. Most of the 15 invoices I've sent them arrive 6 to 8 weeks late, and usually only after...
4
by: Paul T. RONG | last post by:
Dear All, I add two new tables to the database and then the disable shift key codes don't work. These two new tables are actually created by two queries, and only these two are in the front end,...
0
by: faktujaa | last post by:
XML Comment tags (except summary, remarks, param and returns) don't work in my small trial program. The comment tags i want to work are see, seealso, exception, etc. But none of them work. I tried...
19
by: LP | last post by:
I am using (trying to) CR version XI, cascading parameters feature works it asks user to enter params. But if page is resubmitted. It prompts for params again. I did set...
12
by: MrHelpMe | last post by:
Hello again all, I've finished my whole application and now I don't like the whole session variables that I am using. I have a form, user fills in info clicks submit and using CDOSYSMail an...
21
by: jehugaleahsa | last post by:
Hello: I had an hour-long discussion with my boss today. Last night, right before I dozed off, I realized some of his code resulted in duplicate processing. I tried to explain it to him and he...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.