473,387 Members | 1,492 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,387 software developers and data experts.

Enumerating Windows through Service

Jay
Hey There,
I am trying to get a list of the open windows from a Windows
Service. My initial code was written in a regular server and the window
listing function EnumWindows worked fine, but when I ported my code
over to the service, then it stopped working. I saw that this is due to
a service running on a different "non-interactive" dekstop than a
regular user desktop. How would I get a service to just get the window
handles of the currently open windows? The process itself won't need to
open any windows, so I need the interaction to be as minimal as
possible. Any ideas?

-Jay
(patelj27b at gmail dot com)

May 8 '06 #1
1 1113
> I am trying to get a list of the open windows from a Windows
Service. My initial code was written in a regular server and the window
listing function EnumWindows worked fine, but when I ported my code
over to the service, then it stopped working. I saw that this is due to
a service running on a different "non-interactive" dekstop than a
regular user desktop. How would I get a service to just get the window
handles of the currently open windows?


You've identified the root of the problem, but which desktop do you
want? What about terminal server and XP fast user switching operation?

What are you really trying to achieve? There may a better way of
doing what you want.

Dave
May 10 '06 #2

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

Similar topics

0
by: Brett Mostert | last post by:
Hi, I need to be able to Enumerate through Printer Drivers, ports, printers and so fourth. And even add printers, ports, and drivers and setup printers. Sofar i can do all of the following...
7
by: Rohan Ranade | last post by:
I am trying to implement a crawler in C# that scans all the shared folders in remote computers in a windows network. Are there classes in .NET to do this directly? Please help. Thank You. Rohan
4
by: Brett Mostert | last post by:
Hi, I need to be able to Enumerate through Printer Drivers, ports, printers and so fourth. And even add printers, ports, and drivers and setup printers. Sofar i can do all of the following...
1
by: José Achig | last post by:
Hi all, The service I have written can not enumerate the current user's desktop windows when running as a service. I read where one solution to this is to install the service with...
2
by: Tony | last post by:
I have this problem - I have a hashtable, containing a list of filenames. Every 60 seconds, I have a thread that enumerates thru this hashtable, and based on some simple logic, some of the items...
0
by: wifetalks | last post by:
I'm enumerating the computers in the domain to a listview control on my form, but how do I include the comments. Like what you would see in Windows Explorer when you browse the domain. On our...
5
by: Jay | last post by:
Hey There, I have this function that is called through EnumWindows: BOOL CALLBACK EnumOpenWindows(HWND hwnd, LPARAM lParam) { DWORD dwID; LPDWORD dwID2; LPDWORD currProcId;...
0
by: Simon Verona | last post by:
I have a problem on a specific pc... On the PC, in control panel Printers there are a few printers listed, including a printer that is a network share on another PC. I have some code that adds...
4
by: nagar | last post by:
On certain occasions I get COM exceptions errors when enumerating the Windows Explorer active windows Some customers reported the error System.OutOfMemoryException: Retrieving the COM class...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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...

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.