Use chat API from another projects.

Last post 09-01-2008, 8:01 AM by Anton.. 0 replies.
Sort Posts: Previous Next
  •  09-01-2008, 8:01 AM 43413

    Use chat API from another projects.

    Hello!
     
    I tried to create chat room progammatically, and done these steps:
     
    1. In Visual Studio I created new Class Library project.
    2. Added there CuteChat.dll and CuteChat.AppCode.dll
    3. Created method:
    public void AddRoom(string roomName)

          IChatLobby lobby=ChatApi.CreateLobbyInstance();
          lobby.Title = roomName;
          ChatApi.CreateLobby(lobby);
    }
    4. Call this method from Console application and got exception :( :  
     
    System.TypeInitializationException: The type initializer for 'CuteChat.ClusterSupport' threw an exception. --->  System.NullReferenceException: Object reference not set to an instance of an object..
     
    Stack trace:
     
    CuteChat.ClusterSupport..cctor()
    CuteChat.ClusterSupport.get_IsClusterClient()
    CuteChat.ChatApi.CreateLobbyInstance()
    ...
     
    I gues, I have to somehow initialize chat API before use it. But I can't found how. Please help me!
     
View as RSS news feed in XML