Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

Mohammad Tarik

@Mohammad Tarik
About
Posts
45
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Best XMPP/Jabber Library?
    M Mohammad Tarik

    Using XMPP was part of the functionality I needed, others were audio and may be video. I dropped the idea of using XMPP and chose Session Initiation Protocol (SIP) since it's like a container for audio, video and messages. So, basically, it can do all I need. I found a library called SIPEK SDK that is a C# wrapper to pjsip C++ lib. At least it has audio and messages. If I find that the messages part of the above lacks proper functionality, I might go back to XMPP. I found what I mentioned above: I've noticed that there are jabber.net and agsXMPP and both have tutorials here although it seems that jabber.net has less samples on the net. Also, Jabber.NET doesn't seem to have a full working documentation but it's open-source. I read also about another one that has many samples but didn't test it: SoapBox Studio. About server, I used Openfire. It's free and has a web interface (at least the one that comes with Elastix linux distribution)

    C# question csharp css career

  • Best XMPP/Jabber Library?
    M Mohammad Tarik

    Thanks for the help ;P :cool:

    C# question csharp css career

  • Best XMPP/Jabber Library?
    M Mohammad Tarik

    Hello, I want to build XMPP application and trying to choose the best library for this job. I've noticed that there are jabber.net and agsXMPP and both have tutorials here although it seems that jabber.net has less samples on the net. Have you tried any of these and what is your recommendation? Thanks

    C# question csharp css career

  • get_anchors doesn't return all anchors
    M Mohammad Tarik

    Well, at the beginning of my first post, I mentioned that I need to get all links on a web page. I chose get_anchors() because I found a sentence mentioning it in one of CP articles where the author said that it is used to get hyperlinks. I guess that get_links() would do a better job for me after some processing. Sorry for the inconvenience. :-O

    C / C++ / MFC c++ hardware help announcement

  • get_anchors doesn't return all anchors
    M Mohammad Tarik

    I found that get_links can do it. Thanks again.

    C / C++ / MFC c++ hardware help announcement

  • get_anchors doesn't return all anchors
    M Mohammad Tarik

    So, in order to return all the links on a page regardless of name or id attributes, I have to write my own code? Do you know of any other function that can do this? Thanks a lot for your help

    C / C++ / MFC c++ hardware help announcement

  • get_anchors doesn't return all anchors
    M Mohammad Tarik

    No, the URLs returned were strange and I couldn't even find their corresponding anchors. They were like "javascript:submitCJ10.....http://somesite" As you can see from hr = pColl->item(vIndex, vIndex, &pDisp2); I am not trying to put any constraints on the returned URLs.

    C / C++ / MFC c++ hardware help announcement

  • get_anchors doesn't return all anchors
    M Mohammad Tarik

    I am testing with "flightcenter.co.uk" and "google.com". The first one returns some URLs while the second doesn't return any !!

    C / C++ / MFC c++ hardware help announcement

  • get_anchors doesn't return all anchors
    M Mohammad Tarik

    Yes, and sometimes it's zero.

    C / C++ / MFC c++ hardware help announcement

  • get_anchors doesn't return all anchors
    M Mohammad Tarik

    Hello, I am trying to get all links on an web page. Unfortunately, the "get_anchors" doesn't seem to retrieve all anchor elements. I have pages full of links and all I get are few or none. I'm using Visual C++ 2003. I have an MFC Dialog application with embedded webbrowser control. Here's my code: (btw, GetDocument function calls IWebBrowser::get_Document() function and it works fine with things other than getting anchors).

    HRESULT hr;
    IHTMLDocument2 \* pHtmlDoc = GetDocument();
    CStringArray sURLArray;
    
    if (pHtmlDoc != NULL)
    {
        IHTMLElementCollection \* pColl = NULL;
        hr = pHtmlDoc->get\_anchors(&pColl);
    		
    	if(SUCCEEDED(hr))
    	{
    		LONG nElem = 0;
    		hr = pColl->get\_length(&nElem);
    			
    		if(SUCCEEDED(hr))
    		{
    			for(long i = 0; i < nElem; i++)
    			{
    				\_variant\_t vIndex(i);
    				   
    				IDispatch \* pDisp2 = NULL;
    				hr = pColl->item(vIndex, vIndex, &pDisp2);
    				if(SUCCEEDED(hr))
    				{
    					IHTMLAnchorElement \* pAnchElem = NULL;
    					hr = pDisp2->QueryInterface(IID\_IHTMLAnchorElement, (void\*\*) &pAnchElem);
    					if(SUCCEEDED(hr))
    					{
    						BSTR bstrHref;
    						if(SUCCEEDED(pAnchElem->get\_href(&bstrHref)))
    						{
    							CString strLink(bstrHref);
    							if(!strLink.IsEmpty())
    								sURLArray.Add(strLink);
    							SysFreeString(bstrHref);
    						}
    						pAnchElem->Release();
    					}
    					pDisp2->Release();
    				}
    				MessageBox(sURLArray.GetAt(i));
    			}
    		}
    		pColl->Release();
    	} 
    	pHtmlDoc->Release();
    }
    

    Taking a look now at the code. I think that I should have used if(FAILED(...)) return; instead of if(SUCCEEDED(...)) .. it would have been more readable without all these brackets. Any help is appreciated Thanks

    C / C++ / MFC c++ hardware help announcement

  • Your experience with Lotus Notes
    M Mohammad Tarik

    Hello, I have to decide whether to use (Lotus Notes & Domino Server) OR (Outlook & Exchanges Server) in my company. My Boss wants to stop using a remote e-mail server for security reasons. I've never used Lotus Notes, but some employees in the company have used it. They said that it's more secure than Outlook. On the other hand, I remembered reading about it many times here. Many members said that it has serious problems, and that you don't know how could anyone choose it as a standard e-mail client for a company. So, Do you use it now or have used it before? Is it a GUI problem only? Isn't it more secure than Outlook and other clients? Do you recommend a third option for the client, server or both? Thanks Mohammed

    The Lounge sysadmin security help question

  • Electricity good...power outage bad!
    M Mohammad Tarik

    About three months, immediately after the war in 2003. After that and till now, we have it for 1-2 hours every 6 hours or so. What I missed most is internet...and airconditioning during summer (btw, in iraq summer is not 4 months, the hot weather starts from April till Oct.).

    The Lounge question career learning

  • 2 modems connection
    M Mohammad Tarik

    Check this article: Simplified TAPI and Serial Communication^ Or/And take a look at these articles^. Mohammed

    C / C++ / MFC help

  • Hi. How do we go about cross platform encyrption?
    M Mohammad Tarik

    If you were programming using C++, try Crypto++. Many algorithms are available, and can be compiled with many compilers on different platforms. Mohammed

    The Lounge csharp linux algorithms security json

  • Thanks
    M Mohammad Tarik

    Nitron wrote:

    With your education and motivation you'll do much good for your country. Best of luck!

    I hope so! Thanks :)

    The Lounge help c++

  • Thanks
    M Mohammad Tarik

    Thanks :)

    The Lounge help c++

  • Thanks
    M Mohammad Tarik

    Ryan Roberts wrote:

    here's hoping that electricity supply gets better.

    Especially that summer has already started. Thanks Ryan.

    The Lounge help c++

  • Thanks
    M Mohammad Tarik

    Thanks :)

    The Lounge help c++

  • Thanks
    M Mohammad Tarik

    Thanks :-D

    The Lounge help c++

  • Thanks
    M Mohammad Tarik

    Diagon Alley wrote:

    Can we have a CP fan club?

    I will be the first to join. :-D Wait a minute...as jhaga said, the lounge seems to be a nice fan club..and I've just joined, so that makes me the last one to join. :doh:

    The Lounge help c++
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups