Sending a Message Box from a Service to a Remote Session




Download 197,5 Kb.
bet30/49
Sana29.03.2021
Hajmi197,5 Kb.
#13691
1   ...   26   27   28   29   30   31   32   33   ...   49

Sending a Message Box from a Service to a Remote Session


Many services attempt to display simple status information to the active user by displaying a message box. This is typically done by calling one of the Win32® MessageBox* APIs in conjunction with the MB_SERVICE_NOTIFICATION flag. However, on a Terminal Services-enabled system, these pop-up message boxes will usually be displayed on the console, because that is the session in which the service is running. This can be a problem for applications running in remote sessions that make Remote Procedure Call (RPC) calls into the service and then wait for the user to respond to the service’s pop-up window. Because this pop-up window appears on the console, the application running in the remote session appears to hang.

In the Windows 2000 operating system, RPC calls into a service keep track of the session that initiated the RPC call. The Win32 MessageBox* APIs have been enhanced to look for this session information when the MB_SERVICE_NOTIFICATION flag is specified. Before making the MessageBox* API call, the service must impersonate the calling client. The code found in Appendix D can be used in RPC-based services that need to display pop up windows to their calling clients.



Download 197,5 Kb.
1   ...   26   27   28   29   30   31   32   33   ...   49




Download 197,5 Kb.

Bosh sahifa
Aloqalar

    Bosh sahifa



Sending a Message Box from a Service to a Remote Session

Download 197,5 Kb.