Click here to Skip to main content
11,719,903 members (90,587 online)
Click here to Skip to main content

NetMeeting for Windows 7

, 1 Nov 2013 CPOL 77.1K 9.8K 38
Rate this:
Please Sign up or sign in to vote.
Share Desktops between Windows 7 Systems

Introduction

The simple easy to use desktop sharing application "Netmeeting" in Windows XP is killed in Windows 7. It is replaced with meeting place in Vista and removed in Windows 7. After moving to Windows 7, I almost felt the need of it at least once in a week, so I started to implement desktop sharing application in Window 7.

MADMeeting/MainUI.PNG

Background

The desktop sharing application is built using two concepts:

  1. Communication using WCF and
  2. Desktop Sharing using Remote Desktop API

1. Communication using WCF

WCF is used to maintain client and server communication. Server broadcasts the messages to all the clients that are connected. I used Callback in TCP/IP protocol to have the messages sent from server to client.

Code Logic

The application will host a WCF Service. The ServiceContract for IMMService and the callback interface is shown below:

[ServiceContract(SessionMode = SessionMode.Required, 
CallbackContract = typeof(IServerCallbackToClient))]
public interface IMMService
{
    [OperationContract(IsOneWay = true, IsInitiating = true, IsTerminating = false)]
    void Say(Person person, String msg, MessageType MsgType);

    [OperationContract(IsOneWay = true, IsInitiating = false, IsTerminating = false)]
    void Whisper(string to, String msg);

    [OperationContract(IsOneWay = false, IsInitiating = true, IsTerminating = false)]
    Person[] Subscribe(Person name);

    [OperationContract(IsOneWay = false, IsInitiating = false, IsTerminating = true)]
    bool Unsubscribe(Person name);
}  
  • Function Say will send the message to the server, which in turn will broadcast the message to all the connected clients.
  • Function Whisper will send the message to the server for some action. The message will not be broadcasted.
  • Function Subscribe and Unsubscribe are for joining and leaving the meeting group.
public interface IServerCallbackToClient
{
    [OperationContract(IsOneWay = true)]
    void Receive(Person sender, String message, MessageType MsgType);

    [OperationContract(IsOneWay = true)]
    void ReceiveWhisper(Person sender, string message);

    [OperationContract(IsOneWay = true)]
    void UserEnter(Person person);

    [OperationContract(IsOneWay = true)]
    void UserLeave(Person person);
}  

Function Receive is the callback from server to client to inform that the message is received and the same acknowledgements for other operations. The callback channels are stored in the server in the subscribe function. Receive will callback to all the clients using these call back channels.

The date about the user is passed from client and server. The class Person holds this data.

 [DataContract]
public class Person : INotifyPropertyChanged
{
    private string imageURL;
    private string name;
    public event PropertyChangedEventHandler PropertyChanged;

    public Person()
    {
    }

    public Person(string imageURL, string name)
    {
        this.imageURL = imageURL;
        this.name = name;
    }

    [DataMember]
    public string ImageURL
    {
        get { return imageURL; }
        set
        {
            imageURL = value;
            OnPropertyChanged("ImageURL");
        }
    }

    [DataMember]
    public string Name
    {
        get { return name; }
        set
        {
            name = value;
            OnPropertyChanged("Name");
        }
    }

    protected void OnPropertyChanged(string propValue)
    {
        PropertyChangedEventHandler handler = PropertyChanged;
        if (handler != null)
        {
            handler(this, new PropertyChangedEventArgs(propValue));
        }
    }
}

The implementation of this service will be the server which basically works as a Messenger server. The client will login with Subscribe(Person p). The class Person holds the data of the individual systems. Once subscribed, any message sent from any one in the group will be broadcasted to every other one in the group. The Service calls Receive() function to send messages to all connected clients.

2. Desktop Sharing using Remote Desktop API

Remote Desktop APIs are used to broadcast the desktop to all the clients connected.

Using the Code

Class RDPSession is used to share the desktop. When the desktop is shared, it generates an invitation string. The desktop Viewer needs this invitation string to view the shared desktop.

m_pRdpSession.OnAttendeeConnected += 
	new RDPCOMAPILib._IRDPSessionEvents_OnAttendeeConnectedEventHandler
	(OnAttendeeConnected);
m_pRdpSession.OnAttendeeDisconnected += 
	new RDPCOMAPILib._IRDPSessionEvents_OnAttendeeDisconnectedEventHandler
	(OnAttendeeDisconnected);
m_pRdpSession.OnControlLevelChangeRequest += 
	new RDPCOMAPILib._IRDPSessionEvents_OnControlLevelChangeRequestEventHandler
	(OnControlLevelChangeRequest);

m_pRdpSession.Open();
IRDPSRAPIInvitation pInvitation = m_pRdpSession.Invitations.CreateInvitation
	("DesktopShareServer", "Internal", "", 5);
string invitationString = pInvitation.ConnectionString;

When one of the systems shares the desktop, the generated invitation string is broadcasted to all others. The invitation string can then be used to view the desktop.

pRdpViewer.Connect(ConnectionString, "Viewer1", "");
pRdpViewer.Dock = DockStyle.Fill;
pRdpViewer.SmartSizing = true;

Points of Interest

Since the remote desktop is used to share the desktop, the refresh rate is faster than VNC or RADMIN, and also less burden on the CPU.

History

  • 20th April, 2011: Initial post.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

KMSRao
Technical Lead KLA-Tencor
India India
Working in KLA-Tencor, Chennai as Technical Lead. Born in Bapatla, Guntur (dt), Andhra Pradesh. B.Tech from Bapatla Engineering College, M.Tech from IIT Kanpur.

Interesting areas include Image Processing, C# .NET.

You may also be interested in...

Comments and Discussions

 
QuestionHi! Pin
Member 1098428214-May-15 10:49
memberMember 1098428214-May-15 10:49 
QuestionNetmeeting for windows 7 Pin
Member 477698322-Jul-14 19:50
memberMember 477698322-Jul-14 19:50 
QuestionCom Exception Pin
Manoj_Nankani1-May-14 0:02
memberManoj_Nankani1-May-14 0:02 
Questioncant open zip file after the download completes Pin
tse3gbs7-Feb-14 8:23
membertse3gbs7-Feb-14 8:23 
AnswerRe: cant open zip file after the download completes Pin
ScottyCSS25-Apr-14 8:43
memberScottyCSS25-Apr-14 8:43 
QuestionAnyone knows how to compile the source code? Pin
Alessandro Nicoli de Mattos21-Jan-14 9:48
memberAlessandro Nicoli de Mattos21-Jan-14 9:48 
AnswerRe: Anyone knows how to compile the source code? Pin
tse3gbs7-Feb-14 8:25
membertse3gbs7-Feb-14 8:25 
Questioncant download software Pin
katef17-Dec-13 18:39
memberkatef17-Dec-13 18:39 
AnswerRe: cant download software Pin
KMSRao20-Jan-14 17:04
memberKMSRao20-Jan-14 17:04 
GeneralRe: cant download software Pin
Alessandro Nicoli de Mattos21-Jan-14 0:06
memberAlessandro Nicoli de Mattos21-Jan-14 0:06 
GeneralRe: cant download software Pin
Member 477698322-Jul-14 21:39
memberMember 477698322-Jul-14 21:39 
GeneralRe: cant download software Pin
Member 109701689-Sep-14 16:39
memberMember 109701689-Sep-14 16:39 
QuestionNot able to download Net Meeting app Pin
Member 1042667126-Nov-13 0:44
memberMember 1042667126-Nov-13 0:44 
Questionsupporting multi platform Pin
Member 1041716321-Nov-13 6:02
memberMember 1041716321-Nov-13 6:02 
QuestionNetmeeting for windows 7 Pin
Vikas Gp5-Nov-13 0:23
memberVikas Gp5-Nov-13 0:23 
SuggestionGone but replaced... Pin
DaveAuld1-Nov-13 1:43
protectorDaveAuld1-Nov-13 1:43 
QuestionDon't know how to install Pin
Donald Wani14-May-13 4:23
memberDonald Wani14-May-13 4:23 
AnswerRe: Don't know how to install Pin
KMSRao30-Jun-13 23:17
memberKMSRao30-Jun-13 23:17 
QuestionDon't know how to install Pin
Donald Wani14-May-13 4:20
memberDonald Wani14-May-13 4:20 
AnswerRe: Don't know how to install Pin
KMSRao1-Nov-13 1:11
memberKMSRao1-Nov-13 1:11 
Questionneed help regarding your code Pin
Tridip Bhattacharjee18-Nov-12 5:10
memberTridip Bhattacharjee18-Nov-12 5:10 
AnswerRe: need help regarding your code Pin
KMSRao1-Nov-13 1:13
memberKMSRao1-Nov-13 1:13 
QuestionHow to intsall MDA Net meeting in Windows 7 Pin
shabil ahmed9-Oct-12 7:19
membershabil ahmed9-Oct-12 7:19 
AnswerRe: How to intsall MDA Net meeting in Windows 7 Pin
KMSRao1-Nov-13 1:14
memberKMSRao1-Nov-13 1:14 
QuestionDownloaded Executable hangs.. Pin
Jo_aus_SHG10-Aug-12 21:51
memberJo_aus_SHG10-Aug-12 21:51 
QuestionOpaque while "Share Program" in Netmeeting Pin
kuldeepmec27-Jun-12 22:25
memberkuldeepmec27-Jun-12 22:25 
QuestionNot able to download Appication Or SourceCode Pin
kuldeepmec27-Jun-12 21:34
memberkuldeepmec27-Jun-12 21:34 
Questionnetmeeting Pin
mohanrajkiller7-Nov-11 7:49
membermohanrajkiller7-Nov-11 7:49 
AnswerRe: netmeeting Pin
KMSRao1-Nov-13 1:10
memberKMSRao1-Nov-13 1:10 
GeneralMy vote of 2 Pin
Michael Chourdakis4-Oct-11 4:37
memberMichael Chourdakis4-Oct-11 4:37 
GeneralRe: My vote of 2 Pin
KMSRao1-Nov-13 1:10
memberKMSRao1-Nov-13 1:10 
GeneralMy vote of 5 Pin
Member 432084426-Apr-11 1:56
memberMember 432084426-Apr-11 1:56 
GeneralRe: My vote of 5 Pin
shashi04827-Jul-11 23:41
membershashi04827-Jul-11 23:41 
GeneralRe: My vote of 5 Pin
KMSRao28-Jul-11 0:03
memberKMSRao28-Jul-11 0:03 
GeneralRe: My vote of 5 Pin
cyrenet7-Oct-13 16:00
membercyrenet7-Oct-13 16:00 
GeneralRe: My vote of 5 Pin
KMSRao1-Nov-13 1:09
memberKMSRao1-Nov-13 1:09 
GeneralRe: My vote of 5 Pin
KMSRao1-Nov-13 1:23
memberKMSRao1-Nov-13 1:23 
QuestionWhere is the source? Pin
Super Lloyd20-Apr-11 14:27
memberSuper Lloyd20-Apr-11 14:27 
AnswerRe: Where is the source? Pin
KMSRao20-Apr-11 19:34
memberKMSRao20-Apr-11 19:34 
GeneralRe: Where is the source? Pin
Member 740216620-Apr-11 21:16
memberMember 740216620-Apr-11 21:16 
GeneralRe: Where is the source? Pin
KMSRao20-Apr-11 21:34
memberKMSRao20-Apr-11 21:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150901.1 | Last Updated 1 Nov 2013
Article Copyright 2011 by KMSRao
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid