Hi,
I am writing a small utility to perform system maintainence tasks on
Windows. In this, I am launching a MMC snapin as a process using
BackGroundWorke r and using the "RunWorkerCompl eted" event handler to
know when the snapin was closed. This works fine on Xp and Vista 32
bit and the RunWorkerComple ted event handler is called when the snapin
is closed. But on Vista 64, the RunWorkerComple ted event is called as
soon as the snapin is launched.
Has anyone seen this before? Is this a bug or am I missing something
basic.
Thanks,
BR 4 1578
On May 15, 8:44 am, BR <bros...@gmail. comwrote:
Hi,
I am writing a small utility to perform system maintainence tasks on
Windows. In this, I am launching a MMC snapin as a process using
BackGroundWorke r and using the "RunWorkerCompl eted" event handler to
know when the snapin was closed. This works fine on Xp and Vista 32
bit and the RunWorkerComple ted event handler is called when the snapin
is closed. But on Vista 64, the RunWorkerComple ted event is called as
soon as the snapin is launched.
Has anyone seen this before? Is this a bug or am I missing something
basic.
Well I don't think that's really the way to use background worker.
You use it to run long running code in the background not to launch
other processes. If you want to know when the process is closed, use
the System.Diagnost ics.Process class to start and monitor when the
process exits.
On May 15, 2:42 pm, Andy <a...@med-associates.comw rote:
On May 15, 8:44 am, BR <bros...@gmail. comwrote:
Hi,
I am writing a small utility to perform system maintainence tasks on
Windows. In this, I am launching a MMC snapin as a process using
BackGroundWorke r and using the "RunWorkerCompl eted" event handler to
know when the snapin was closed. This works fine on Xp and Vista 32
bit and the RunWorkerComple ted event handler is called when the snapin
is closed. But on Vista 64, the RunWorkerComple ted event is called as
soon as the snapin is launched.
Has anyone seen this before? Is this a bug or am I missing something
basic.
Well I don't think that's really the way to use background worker.
You use it to run long running code in the background not to launch
other processes. If you want to know when the process is closed, use
the System.Diagnost ics.Process class to start and monitor when the
process exits.
I agree with Andy. However, for an explanation of the behaviour being
observed, it's possibly related to the fact that there are two MMCs on
64 bit, and in some circumstances the wrong one is started, sees that,
launches the correct one and then exits. http://technet2.microsoft.com/Window....mspx?mfr=true
discusses this briefly in point (2).
Damien
The same problem exists even if I launch a process in a seperate
thread.
BR
On May 15, 6:42 pm, Andy <a...@med-associates.comw rote:
On May 15, 8:44 am, BR <bros...@gmail. comwrote:
Hi,
I am writing a small utility to perform system maintainence tasks on
Windows. In this, I am launching a MMC snapin as a process using
BackGroundWorke r and using the "RunWorkerCompl eted" event handler to
know when the snapin was closed. This works fine on Xp and Vista 32
bit and the RunWorkerComple ted event handler is called when the snapin
is closed. But on Vista 64, the RunWorkerComple ted event is called as
soon as the snapin is launched.
Has anyone seen this before? Is this a bug or am I missing something
basic.
Well I don't think that's really the way to use background worker.
You use it to run long running code in the background not to launch
other processes. If you want to know when the process is closed, use
the System.Diagnost ics.Process class to start and monitor when the
process exits.
On May 15, 11:35 am, Roshan <bros...@gmail. comwrote:
The same problem exists even if I launch a process in a seperate
thread.
Check out the link Damien posted. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Matthias S. |
last post by:
Hi,
I've written a simple app which should just fetch some data from a
database and render the results into a ListView.
In order to not freeze the GUI, I'm using a BackgroundWorker. The
arguments for the RunWorkerAsync are the Query to be executed and the
Connectionstring. As a result I hoped I could return a SqlDataReader.
The problem is, if I create the SqlDataReader within the
|
by: Mitchell Vincent |
last post by:
I just read my MSDN magazine from last month and was very pleased to see
an article about performance and the small(er) things you can do to
improve it.
I have a pretty big database driven winforms application that I've been
working on and am very disappointed in the time it takes to show some of
these windows. I am doing a lot of data binding and database access in
the form's loading event. I do SuspendLayout/ResumeLayout around the...
|
by: elziko |
last post by:
I know I can stop my thread by using the CancelAsync method of the
BackgroundWorker but that requires me to monitor the value of the
CancellationPending property in my BackgroundWorker.DoWork event.
This means that if the DoWork event is processing a single line of code then
my code must wait for this line to finish before it can check the value of
CancellationPending.
What if the user wants to cancel before I can check this value? Is...
|
by: Rob R. Ainscough |
last post by:
I'm using a BackgroundWorker to perform a file download from an ftp site.
Per good code design practices where I separate my UI code from my core
logic code (in this case my Download file method in my FileIO class) I've
established Public Event in my core logic classes along with RaiseEvents
(that will updated a progress bar on the UI side). This all works great
when I'm NOT using Threading (BackgroundWorker), however, as soon as I...
|
by: =?Utf-8?B?VE9NX1Bhc2FkZW5h?= |
last post by:
Hello,
In my ASP.Net app I'm launching a BackgroundWorker thread in my Page_Load
function. In that thread I'm attempting to connect to a SQL server using
this connection string "Initial Catalog=MyDB;Data Source=MyServer;Integrated
Security=True;".
When I use the same connection string in my main thread of execution it
works fine. However when I use that connection string in the newly created
thread I get this exception: "Login...
| |
by: ray.ackley |
last post by:
Hello all,
I have an app that uses a BackgroundWorker() object to read USB data
that is being fed in serially (FT245R chip, www.ftdichip.com). It
looks just like a serial data stream. Anyhow, it reads in the bytes
and finds the header and footer and pulls packets out of the data
stream. Nice, easy stuff. It then stuffs the packet into into a
class I made up to pull the data out through the ProgressChanged
event. The class is pretty...
|
by: =?Utf-8?B?cmFuZHkxMjAw?= |
last post by:
I have an application with several BackgroundWorker threads. I hoped I'd be
able to just type backgroundworker1.Name = "bw1"; but I don't see a name
property.
Any thoughts on how to name a backgroundworker thread?
Thanks,
Randy
|
by: BR |
last post by:
Hi,
I am writing a small utility to perform system maintainence tasks on
Windows. In this, I am launching a MMC snapin as a process using
BackGroundWorker and using the "RunWorkerCompleted" event handler to
know when the snapin was closed. This works fine on Xp and Vista 32
bit and the RunWorkerCompleted event handler is called when the snapin
is closed. But on Vista 64, the RunWorkerCompleted event is called as
soon as the snapin is...
|
by: =?Utf-8?B?SGVucnk5OQ==?= |
last post by:
What happens here?
The backgroundworker (bgw) unzips RTF-Helpfiles (up to 1 MB in size).
The ProgressChanged-Event gets the unzipped files (to display them in a
RichtTextBox)
It follows the Trace that prints always what bgw has unzipped and what
ProgressChanged received:
1. bgw: HelpFilelistgzip
2. ProgressChanged: HelpFilelistgzip OK!
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |