Solved

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

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Turn a spreadsheet into a vba executable. 2 86
Generic progress indicator 6 117
sumHeights  challenge 17 71
Updating statistics with error notification email in SQL server 4 95
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…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

777 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