Solved

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

Posted on 1998-07-06
5
169 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
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to create frequencies of a variable from SAS dataset? 10 133
WinWaitActive parameters 12 31
sumHeights  challenge 17 75
Problem to event 3 105
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 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