473,799 Members | 3,339 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CloseHandle freezes

Hi,
I have a problem related to CloseHandle. While calling to
CloseHandle(hHa ndle) sometimes the code gets hang up, control doesnt
return back from CloseHandle. The handle passed to the method points
to a NIC on my machine. When the handle was opened the NIC was enable
but later I disable the NIC and then call the CloseHandle. The exe
just hungs up, and cant be killed. I need to restart my machine to
overcome the problem.

Can anyone help me.
Thanx in advance.

Feb 7 '07 #1
4 5543
On Feb 7, 9:18 am, "Vikas" <bhansalivi...@ gmail.comwrote:
Hi,
I have a problem related to CloseHandle.
I guess CloseHandle is some Windows stuff. If so, you should consult a
Windows newsgroup (microsoft.publ ic.*). It is off-topic here anyway.

/Peter

Feb 7 '07 #2
On Wed, 07 Feb 2007 00:18:31 -0800, Vikas wrote:
Hi,
I have a problem related to CloseHandle. While calling to
CloseHandle(hHa ndle) sometimes the code gets hang up, control doesnt
return back from CloseHandle. The handle passed to the method points
to a NIC on my machine. When the handle was opened the NIC was enable
but later I disable the NIC and then call the CloseHandle. The exe
just hungs up, and cant be killed. I need to restart my machine to
overcome the problem.
What is your C++ question?

--
Lionel B
Feb 7 '07 #3
On Feb 7, 2:46 pm, "Lionel B" <m...@privacy.n etwrote:
On Wed, 07 Feb 2007 00:18:31 -0800, Vikas wrote:
Hi,
I have a problem related to CloseHandle. While calling to
CloseHandle(hHa ndle) sometimes the code gets hang up, control doesnt
return back from CloseHandle. The handle passed to the method points
to a NIC on my machine. When the handle was opened the NIC was enable
but later I disable the NIC and then call the CloseHandle. The exe
just hungs up, and cant be killed. I need to restart my machine to
overcome the problem.

What is your C++ question?

--
Lionel B
why this api is not behaving nromally, thats my question.

Feb 7 '07 #4
Vikas wrote:
On Feb 7, 2:46 pm, "Lionel B" <m...@privacy.n etwrote:
>On Wed, 07 Feb 2007 00:18:31 -0800, Vikas wrote:
Hi,
I have a problem related to CloseHandle. While calling to
CloseHandle(hHa ndle) sometimes the code gets hang up, control doesnt
return back from CloseHandle. The handle passed to the method points
to a NIC on my machine. When the handle was opened the NIC was enable
but later I disable the NIC and then call the CloseHandle. The exe
just hungs up, and cant be killed. I need to restart my machine to
overcome the problem.

What is your C++ question?

why this api is not behaving nromally, thats my question.
Unfortunately, CloseHandle is not a standard C++ function, so this is the
wrong newsgroup for that question.
See question 5.9 in the C++ FAQ lite for suggestions on where to post your
question.

Feb 7 '07 #5

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

Similar topics

0
1741
by: Enterprise | last post by:
Hi, I use Access 2000. FEBE design. Tables on server, and everything else on local machine. I have 1 table with a primary key ID field and a text field with names in it. This table is like a translator. I have a form that gets a text field from another table with numbers seperated by commas. The form translates this using the translator table and a module. So like 99,34,23, will be translated to bob,mary,tom,. Again, 99 34 and 23 are from...
1
1931
by: Yahya Saad | last post by:
Dear All, I have upgraded and application I developed on VB6 which uses the Mscomm1 component and reads from COM1 port data send, then sends these records to a table in SQL 2000. I upgraded the application to VB.Net windows form to use the try catch method of trapping errors, the form runs smoothly but after about 10 minutes the form freezes without raising any error. Any hints will be useful.
3
2374
by: Abubakar | last post by:
Hi, from msdn: "Closing a thread handle does not terminate the associated thread. To remove a thread object, you must terminate the thread, then close all handles to the thread." Through the documentation it seems that the thread proc must be exited *first* and than the CloseHandle should be called on its handle. My problem is that my threads will exit whenever they want without notifying any other part of my code. So who will take...
0
849
by: Daniel | last post by:
C# windows service freezes on System.Diagnostics.Process.Start(info) When I launch PSCP from a C# windows service and launch pscp 0.53 there are no issues. but when I use C# windows service to launch pscp 0.58 C# freezes in System.Diagnostics.Process.Start(info)? pscp 0.58 works fine at command line, but causes C# to freeze on ystem.Diagnostics.Process.Start(info) also i noticed that the pscp process does not show in taske manager while...
0
2707
by: genojoe | last post by:
I am running an application that, when not used, just sits there firing a BackgroundWorker every 20 seconds. Every now and then, the BackgroundWorker freezes between the DoWork and RunWorkerCompleted procedures. My simplified procedures are shown below. They endlessly write messages to a text file. At some point it never moves from DoWork to RunWorkerCompleted. I do have services such as Outlook and Norton SystemWorks running in the...
4
1713
by: genojoe | last post by:
My development computer (1 gig, XP Home Edition SP2) freezes when I am editing a very large VB.NET project. It can take minutes to move between a code pane and the Find and Replace pane. On occasion, it freezes for one or more hours no matter what I do. I would go back to an earlier version of VS but I have already invested too much time incorporating features that only exist in VS 2005. I have installed the HotFix but it did not do...
0
2612
by: Marcin Szarek | last post by:
Hi! For a few months we suffer mysterious problem with Oracle 10g RAC (more details on server configuration at the bottom). At regular basis (every 5 minutes) nodes of our cluster "freeze" - during couple of seconds operating system for some mysterious reason does nothing - as far as we're concerned - in userspace. Every single userspace process stops for this period. After a few seconds system comes back to life and all suspended...
2
1667
by: =?Utf-8?B?dG9ueSBsb2Nr?= | last post by:
Has anybody else noticed that this webpage freezes when viewed with IE7 on a wide screen (1920*1200) when IE7 is maximised. Or is it just me, using Vista Ultimate by the way.
1
3097
by: xfroggy | last post by:
Alright guys, If someone could give me some ideas or examples if possible since I'm really stuck on this one without a clue how to proceed. I'm trying to write a little logging program for my scanner, but I'm stuck with infinite loop. Still new to programming, but I got myself to dead end. I want my program to have infinite loop when I press the toggle button and the info to display in labels in my gui. I got that by clicking a button, but...
0
9687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10484
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10228
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7565
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5585
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4141
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.