Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making an application visible on a remote computer

Status
Not open for further replies.

aitor

Programmer
May 15, 2001
18
ES
Hi,

I was trying to use DCOM to execute a .exe in a remote computer(let´s say, notepad.exe) in this way:

I have made an Active X exe with a class that has only one method:

Public Sub LaunchNotepad()
Shell "notepad.exe", vbNormalFocus
End Sub

Next, I instantiate (from a client .exe running on computer A) an object of this class running in computer B (server), and I call its LaunchNotepad method. The notepad.exe process starts in computer B, but it runs in background (you can see Notepad.exe in the Task Administrator (processes) of Windows 2000. My problem is that I want to make it visible in computer B. How could I do it? I have tried to use the API (FindWindow and ShowWindow), but they don´t work ok.

Thanks,

Aitor.
 
You can't. The version of Notepad launched by DCOM is appearing in a different window station than the one the logged-on user is working with.

When Windows (NT/2k/XP) starts up, there are three window stations created - the one for the secure login, the one for the screen saver, and the one for the system user. As soon as a person logs into the console, another window station is created for them. DCOM runs under the system account, and only does user proxying for establishing security rights. It uses the system window station for displaying dialogs and windows (something a DCOM app shouldn't do, BTW), which is not visible to the logged on user. See "Inside Windows NT" by Soloman for more info.

Chip H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top