Solved

Detecting Citrix using .NET

Posted on 2004-10-26
361 Views
Last Modified: 2008-03-03
How do you detect a Citrix Session ID using .Net?
0
Question by:Armon14
    1 Comment
     
    LVL 48

    Accepted Solution

    by:
    Paste from MSDN:

    Monitoring Session Connections and Disconnections
    For the service-side application to monitor session connections and disconnections, you must register it with Terminal Services in the following manner. First, you must store the name of the virtual channel server application in the registry. Add a subkey under the following location.

    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control
       \TerminalServer\Addins
    The subkey can have any name. It must have a REG_SZ value, Name, that contains the symbolic name of the application.

    Name = AddinName
    The maximum length of both the subkey and the value of Name is 99 characters.

    It must also have a REG_DWORD value that indicates the type of server application.

    Type = AddinType
    AddinType must be the following value.

    Value Meaning
    3 User-mode application, session space.


    Registration of the server application takes effect only in sessions created after the registration was performed.

    Each registered server application can create two event objects that are signaled when a client connects or disconnects. The names of these event objects are Reconnect and Disconnect, respectively, and have the following format:

    Global\AddinName-SessionId-Reconnect
     
    Global\AddinName-SessionId-Disconnect
    AddinName is the string specified in the Name value of the registry subkey under which the server application is registered. SessionId is the session identifier of a client session.

    The server application must create these event objects in an unsignaled state. When a client application connects or disconnects from a session, Terminal Services sets the appropriate event to the signaled state. If the user application must monitor these event objects again, it must reset them to the unsignaled state.
    <end paste>

    the URL: http://msdn.microsoft.com/library/psdk/termserv/wtsapi_8vhv.htm

    see also: TEvent in syncobjs which is a wrapper around win32 event objects.

    hope this helps
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

    884 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

    23 Experts available now in Live!

    Get 1:1 Help Now