Thank you guys for your answers,
I started from "MessagingServiceController" and got to the interface "IInternalMessagingController" (in DotNetNuke.Services.Social.Messaging.Internal) . I guess it works for me to use methods like InternalMessagingController.Instance.CountUnreadMessages()
About the concerns of future changes, I am making a chat box like Facebook (I am making it for a specific need of a customer but with some changes it could be used by public), I can upload it at Codeplex and when DNN changed I can change this module accordingly.
I could not find and documentations or comment in the source codes for these methods though, so I wonder what is a "Conversation" and what is a "Thread" ,what happens when you "MarkMessageAsDispatched" and now can I get a list of new messages, I can count them but I cant get them as a list ?
Thank you very much again
ps: it seems it has a very advanced architecture though, I earned how to use it for now but I would like to learn about it do you know where I can get quick information about that ?