Solved

Displaying GUI in an automation object created by an ATL service.

Posted on 1998-07-06
5
176 Views
Last Modified: 2013-11-19
Using an ATL NT Service, I need to create automation objects and have them display a GUI. In some cases it is a dialog in others it is SDI. When an ATL NT Service runs NOT as an NT service, but as a normal exe, any automation object which it creates will display itself by calling a 'ShowWindow' method in the object. When an ATL NT Service runs AS an NT service, it can still create automation objects, however the automation objects don’t seem to be able to display themselves. After the NT Service creates the automation object, I attach to it in a Debugging session. I can step over the calls in the 'ShowWindow' method. All return fine but nothing was ever displayed.

Is it possible to do this?
0
Comment
Question by:pdeline
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 1

Accepted Solution

by:
dkremer earned 300 total points
ID: 1318769
NT Services by nature don't have a user-interface - by their definition they should run without any attention.
Usually when you need to display data of a service you run a different executable which communicates to the service and displays the appropriate data.

0
 
LVL 4

Expert Comment

by:piano_boxer
ID: 1318770
You can allow a service it have a GUI by setting the 'Allow service to interact with desktop' flag in the service control manager.
0
 

Author Comment

by:pdeline
ID: 1318771
dkremer was not helpful.
piano_boxer was.
0
 
LVL 4

Expert Comment

by:piano_boxer
ID: 1318772
...and you gave the points to dkremer !!!!! (hmmm)
0
 
LVL 1

Expert Comment

by:dkremer
ID: 1318773
Services by definition shouldn't interact with the user - they should run unattended.
It is possible for a service to interact with the desktop but it's a bad design. Usually (*again*) when a service needs to display some output of it's activity it has an 'sibling' application that displays that information.
I really don't care about the stupid points, if anyone else wants them pdeline can give it away, I don't care
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question