Nytro Posted March 5, 2010 Report Posted March 5, 2010 (edited) De la oferta celor de la Alonia, am descarcat clientul lor si am inceput "sa ma uit prin el". Mi-a sarit in ochi FedIM.dll ( bine, m-am jucat cu mai multe fisiere ) si am vrut sa vad "ce stie sa faca". Controlul e de la Eyeball Messenger SDK care "costa" si pe care nu l-am mai gasit niciunde. Crezand ca e o librarie obisnuita am vrut sa vad tabela de exporturi, dar cum functiile apareau ca fiind COM Method insemna ca e de fapt un control ActiveX. Asta inseamna ca se putea folosi foarte usor intr-un mediu de programare ca Visual Basic.Asadar, l-am adaugat pe formular ( vedeti in video ) si m-am uitat la functiile sale. Logarea necesita un parametru numit service, dar pe care le-am gasit foarte usor cu Notepad++ in acest control. Apoi a fost simplu, doar o mica problema. La trimiterea unui mesaj de exemplu aveam nevoie de un user handle. Dar am gasit repede solutia. Partea proasta e ca merge putin greu si nu cred ca se pot face mai multe logari. Bine, probabil se poate dar nu am stat sa imi bat capul. E frumos ca ai acolo functii si evenimente deja scrise. De exemplu OnMessageReceive sau cum e, ai in vectorul "v" tot ce iti trebuie: user handle, user id, from, message. Nu mai stiu exact, parsati si voi "v"-ul care e un array la avenimente cu un simplu for si vedeti tot ce contine.Controlul il gasiti in Alonia/Redist/FedIM.dll dupa ce instalati Alonia. Sau il descarcati de aici:http://rapidshare.com/files/359276995/FedIM.dllVideoclipul detaliat, cred ca veti intelege:http://filetransfer.ro/uploads/7Simple_Yahoo!_Game.avihttp://rapidshare.com/files/359325850/Simple_Yahoo__Game.aviSau youtube:http://www.youtube.com/watch?v=dc4G-IJ2o80Totul e banal, trebuie sa ai imaginatie. Nu uitati nu e doar pentru Yahoo!, se poate folosi si pentru MSN, AIM...Daca aveti intrebari le astept aici. Edited March 5, 2010 by Nytro Quote
daatdraqq Posted March 5, 2010 Report Posted March 5, 2010 Frumos!Mai bine il numeai "salam-mess" Quote
pcgenius Posted March 5, 2010 Report Posted March 5, 2010 Problema: Cand incerc sa il folosesc in C# (VS2008) imi da not responding imediat ce rulez programul. L-am pus pe forma, nu am scris nimic si da not responding din prima. Are cineva vreo idee de ce? Quote
Nytro Posted March 5, 2010 Author Report Posted March 5, 2010 Asteapta putin, si mie mi se incarca putin greu, probabil face cate ceva, request-uri catre un server, nu stiu, nu am stat sa verific. PS: E posibil sa mai fie nevoie de http://rapidshare.com/files/359324741/AnyFirewall.dll Quote
pcgenius Posted March 5, 2010 Report Posted March 5, 2010 Problema e ca imi da not responding fara sa incerc sa ma conectez. Nici nu apuc sa vad forma. Cum rulez, apare eroarea fara ca eu sa fi scris nimic in sursa, doar am adaugat controlul pe forma si am dat run.EDIT: Am incercat acum si in VB, tot in visual studio si am aceeasi problema. De adaugat l-am adaugat din toolbox - choose items/com components/browse si apoi din folderul de la alonia. O chestie ciudata e ca la mine nu il ia ca FedIM Library, ii zice Eyeball Messenger SDK FedIM Class, iar controlul se numeste AxFedIMControl1. In rest am aceleasi functii, cand incerc sa scriu in cod le vede perfect, la compile nu imi gaseste erori, insa cum ii dau run imi da not resp. Quote
Nytro Posted March 5, 2010 Author Report Posted March 5, 2010 Ciudat. Nu am VS9 sau VS2010 sa incerc. Si daca astepti putin tot asa ramane? Quote
Usr6 Posted March 5, 2010 Report Posted March 5, 2010 am incercat si eu sa ma joc cu el in VB2008, la debug zicea ca ii lipseste XMPP (probabil asta Extensible Messaging and Presence Protocol XMPP Standards Foundation ) Quote
Nytro Posted March 5, 2010 Author Report Posted March 5, 2010 Poti arata un screenshot cu eroarea? E posibil sa fie necesare mai multe fisiere. Cand am timp testez pe VirtualBox fara Alonia instalat. Quote
pcgenius Posted March 5, 2010 Report Posted March 5, 2010 Asa moare: http://www.imagehost.ro/pict/051750494b912859ab69f.jpgPS: am alonia instalat. Quote
Nytro Posted March 5, 2010 Author Report Posted March 5, 2010 Thanks. Pai nu stiu care ar putea fi problema, poate incompatibilitate, dar nu cred. Alonia a fost scris tot folosind .NET, cred ca Visual C++ 2008, nu stiu, nu m-am interesat. A incercat careva in Visual Studio 6? A, si ce sisteme de operare aveti? XP? Quote
pcgenius Posted March 5, 2010 Report Posted March 5, 2010 Vista.La debug:An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in System.Windows.Forms.dllAdditional information: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) Quote
Nytro Posted March 5, 2010 Author Report Posted March 5, 2010 Ah, dupa ce ai descarcat FedIM.dll, ai dat regsvr32 Locatie/FedIM.dll ? Quote
pcgenius Posted March 5, 2010 Report Posted March 5, 2010 Fix la asta ma uitam si eu... Nu dadusem, am dat acum dar am aceeasi problema, aceeasi eroare in debugger. O sa mai incerc cu asta, sa vad ce e. Eventual sa incerc sa dezactivez UAC la Vista.Oricum, nu am descarcat FedIM separat, l-am luat din folderul de la alonia. Quote
Nytro Posted March 5, 2010 Author Report Posted March 5, 2010 Ai copiat FedIM.dll in alta locatie apoi ai dat Browse din Visual Studio? Sau a aparut implicit in lista? Quote
pcgenius Posted March 5, 2010 Report Posted March 5, 2010 Prima oara am dat Browse unde il descarcasem, fara sa dau regsvr32, apoi am instalat alonia, am dat regsvr "C:\Program Files (x86)\Alonia\Redist\FedIM.dll", iar in vs l-am luat cu browse tot de acolo. Uneori imi apare implicit in lista, uneori nu, nu stiu de ce. Quote
Nytro Posted March 5, 2010 Author Report Posted March 5, 2010 Revin cu detalii dupa ce fac mai multe teste pe VirtualBox. Quote
pcgenius Posted March 5, 2010 Report Posted March 5, 2010 Ok, un mic update.Am incercat sa fac console application. La fel, da not responding imediat. Eroarea:Unhandled Exception: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {D096B9A6-64BF-4581-B9E8-2CD5C8C53AA3} failed due to the following error: 80040154. at ConsoleApplication2.Program.Main(String[] args)Am cautat in registrii, si clsid-ul asta e din HKCR\EyeballMessengerSDK.FedIM\. Se pare ca tot pe-aici e buba.EDIT:Am pornit aplicatia cu Process Monitor deschis.20:34:15,2988851 ConsoleApplication2.exe 3288 RegOpenKey HKCU\Software\Classes\CLSID\{D096B9A6-64BF-4581-B9E8-2CD5C8C53AA3} NAME NOT FOUND Desired Access: Read20:34:15,2989683 ConsoleApplication2.exe 3288 RegOpenKey HKCR\CLSID\{D096B9A6-64BF-4581-B9E8-2CD5C8C53AA3} NAME NOT FOUND Desired Access: ReadSe pare ca totusi nu a avut niciun efect regsvr? Quote
Nytro Posted March 5, 2010 Author Report Posted March 5, 2010 (edited) Ai incercat sa copiezi FedIM.dll in system32? Pff ce urat ca am VirtualBox pe Linux si acum am nevoie de Windows. Cand am timp incerc sa vad daca reusesc in VS 2010 cred.Edit: Da, e posibil sa nu fie inregistrat. Edited March 5, 2010 by Nytro Quote
pcgenius Posted March 5, 2010 Report Posted March 5, 2010 Hmm.. zici sa dau un regsvr in system32\FedIM.dll? La components vad ca el mi-l ia implicit din program files\aloniaedit - am dat regsvr /u, apoi regsvr in alt path, am facut un nou proiect in vs si am incercat aceeasi chestie, insa eroarea e exact aceeasi (inclusiv clsid-ul). S-ar putea sa nu fie totusi de la fedim.dll.EDIT2: Gata, am reusit in cele din urma sa-l fac sa mearga. Acum am alta problema, nu reusesc sa gasesc handle-ul. Mai exact, nu reusesc sa gasesc acel vector.private void axFedIMControl1_OnSessionConnectSuccess(object sender, AxFEDIMLib._IFedIMControlEvents_OnSessionConnectSuccessEvent e)Nu am decat un "e.v", care e object si nu pot sa-l apelez cu e.v[0] de exemplu. Idei, ceva? Quote
dragosdydy Posted March 6, 2010 Report Posted March 6, 2010 (edited) felicitari pentru tutorial !! simplu si la obiect pacat ca nu merge spam cu buzz later edit: m-am incurcat la cod in visual basic .net 2008 Private Sub AxFedIMControl1_OnSessionConnectSuccess(ByVal sender As Object, ByVal e As AxFEDIMLib._IFedIMControlEvents_OnSessionConnectSuccessEvent) Handles AxFedIMControl1.OnSessionConnectSuccess Dim handle As Integer handle = v(0)Primesc "v is not declared" Si daca pun "Dim handle as Integer" in Form primesc "Warning 1 variable 'handle' conflicts with property 'handle' in the base class 'Control' and should be declared 'Shadows'." Ce sa fac? Edited March 6, 2010 by dragosdydy sa nu fac double post Quote
dragosdydy Posted March 6, 2010 Report Posted March 6, 2010 am reusit sa rezolv. am folosit si functia de SetStatus si cea de la OnMessageRecived.. e chiar nice sdk-u asta... bravo inca odata nytro! Quote
dragosdydy Posted March 6, 2010 Report Posted March 6, 2010 Public Class Form1 Dim login As Integer Dim busy As Integer Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click AxFedIMControl1.Login(TextBox1.Text, TextBox2.Text, "Yahoo!") End Sub Private Sub AxFedIMControl1_OnSessionConnectSuccess(ByVal sender As Object, ByVal e As AxFEDIMLib._IFedIMControlEvents_OnSessionConnectSuccessEvent) Handles AxFedIMControl1.OnSessionConnectSuccess login = MsgBox("You have been logged in!") End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click AxFedIMControl1.Logout(login) End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click AxFedIMControl1.SendTextMessage(login, TextBox3.Text, TextBox4.Text) End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click busy = CheckBox1.Checked AxFedIMControl1.SetStatus(login, TextBox5.Text, busy) End Sub Private Sub AxFedIMControl1_OnSessionMessageReceive(ByVal sender As Object, ByVal e As AxFEDIMLib._IFedIMControlEvents_OnSessionMessageReceiveEvent) Handles AxFedIMControl1.OnSessionMessageReceive AxFedIMControl1.SendTextMessage(login, TextBox3.Text, "Mi-ai scris ceva?") End Sub Quote
pcgenius Posted March 7, 2010 Report Posted March 7, 2010 Ha.. cred ca de faptlogin = MsgBox("You have been logged in!")e doar un dialog result, care o sa fie mereu 1 daca messagebox-ul se afiseaza cu succes. Iar din cate am observat, handle-ul acela e mereu (sau aproape mereu) 1. Quote