Process.MainWindowTitle & Win Service

R

Rajesh Abraham

In the code below, I am getting the title as null for all
the process when the function (BisLayer) is called from a
windows service. However the same function when called
from a windows from gives the proper result. I tried to
run the service as localSystem and as administartor but
both gives the same result.

Process[] myProcesses = Process.GetProcesses();
foreach(Process myProcess in myProcesses)
{title = myProcess.MainWindowTitle;}

Thanks,

Rajesh Abraham
 
H

Horatiu Ripa

Read carefully
ms-help://MS.NETFrameworkSDKv1.1/cpguidenf/html/cpconIntroductionToNTService
Applications.htm
and you'll find why
 
R

Rajesh Abraham

Hi Ripa,

Thanks for the response. Can you suggest me some articles
or preferable a good book that can get me started with
progrramatically accessing "Window Stations" and Desktops.
I have only C# experience and no C++.

Thanks,

Rajesh ABraham Chacko

-----Original Message-----
Read carefully
ms- help://MS.NETFrameworkSDKv1.1/cpguidenf/html/cpconIntroduct
ionToNTService
Applications.htm
and you'll find why

--
Horatiu Ripa
Rajesh Abraham said:
In the code below, I am getting the title as null for all
the process when the function (BisLayer) is called from a
windows service. However the same function when called
from a windows from gives the proper result. I tried to
run the service as localSystem and as administartor but
both gives the same result.

Process[] myProcesses = Process.GetProcesses();
foreach(Process myProcess in myProcesses)
{title = myProcess.MainWindowTitle;}

Thanks,

Rajesh Abraham


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top