Solved

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

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now