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
G

GriffonRL

@GriffonRL
About
Posts
40
Topics
17
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Multithreaded application design question.
    G GriffonRL

    Hello, I am working in a multithreaded application and I need to find the best solution to handle this: I have several threads running in parallel doing very similar things against different objects. My problem is that some objects may sometimes be too long to wait for or may have disappear (this is a network application). I would like to be able to make a thread wait for the object no longer than a certain time (30 seconds for example) after calling it. I want to sleep my thread for this period of time and let the others threads work. My concern is that a thread.sleep(30000) is not right because time is taken also be the others threads. A thread.sleep(30000) doesn't mean this thread will wait 30 seconds of its running time, but 30 seconds of real shared time. The reality is that the thread will maybe run only for 10 seconds in this 30 seconds. My question is: what kind of solution exists to effectively make a thread wait for 30 seconds of its running time ? Thanks, R. LOPES Just programmer.

    C# question design sysadmin help tutorial

  • WebBrowser control questions
    G GriffonRL

    Hello, When playing with the webbrowser control I realized two things: - If I call Navigate("about:blank"...) and the line after Navigate("http://www.test.com/"...), the first call 'about:blank' never fire a beforeNavigate2,NavigateComplete and DocumentComplete events and the webbrowser is not loaded with the blank page. Of course the second call properly load the page and all events are fired. How is it possible to make sure that both Navigate calls are going to work ? - When I use Webbrowser.Stop() it seems that it doesn't prevent the browser to continue loading parts of the page and fire Before,Complete & so on events. Maybe the problem is related to the other because I try to call first Webbrowser.Stop() and I call Navigate ("about:blank"...) the line after to empty the Webbrowser. I'm not sure the WebBrowser.Stop() is executed but the second call "about:blank" fire before,complete & so on events and works. How is it possible to make that the Webbrowser.Stop() call works ? And if Stop() doesn't do it, how is it possible to prevent the load of parts of the page ? Any help will be greatly welcome, R. LOPES Just programmer.

    C# help com question learning

  • WebBrowser control: stuck with interframe security
    G GriffonRL

    Hello, I'm trying to parse frames from pages using the WebBrowser control and sometimes when frames or iframes are not from the same domain as the main page, I get an interframe security problem. This problem (or feature of IE) is well known and a workaround exists for C++. My problem is that I'm not comfortable with COM object and don't known how to translate the workaround into C#. Any help on translating this will be greatly welcome. Here is the KB article from MSDN: KB196340 - HOWTO: Get the WebBrowser Object Model of an HTML Frame // Get the IDispatch of the document LPDISPATCH lpDisp = NULL; lpDisp = m_webBrowser.GetDocument(); if (lpDisp) { IOleContainer* pContainer; // Get the container HRESULT hr = lpDisp->QueryInterface(IID_IOleContainer, (void**)&pContainer); lpDisp->Release(); if (FAILED(hr)) return hr; IEnumUnknown* pEnumerator; // Get an enumerator for the frames hr = pContainer->EnumObjects(OLECONTF_EMBEDDINGS, &pEnumerator); pContainer->Release(); if (FAILED(hr)) return hr; IUnknown* pUnk; ULONG uFetched; // Enumerate and refresh all the frames for (UINT i = 0; S_OK == pEnumerator->Next(1, &pUnk, &uFetched); i++) { // QI for IWebBrowser here to see if we have an embedded browser IWebBrowser2* pBrowser; hr = pUnk->QueryInterface(IID_IWebBrowser2, (void**)&pBrowser); pUnk->Release(); if (SUCCEEDED(hr)) { // Refresh the frame pBrowser->Refresh(); pBrowser->Release(); } } pEnumerator->Release(); } Thanks, R. LOPES Just programmer.

    C# help csharp c++ html com

  • Oject memory adress.
    G GriffonRL

    Hi Leppie, I'm amazed :omg: ! Thank you very much for this. Coding at the IL level looks very hardcore for me ;). Good for you. .NET has no secret for you :-D. Cheers, R. LOPES Just programmer.

    C# csharp performance

  • Oject memory adress.
    G GriffonRL

    Hi Leppie, What is this crazy idea of yours to build a VM on top of the VM of .NET :) ? Nevertheless, thank you for sharing with me your researches. By the way, for your nBass project, the BASS library has just been updated to 1.8a. Cheers, R. LOPES Just programmer.

    C# csharp performance

  • Oject memory adress.
    G GriffonRL

    Hi Leppie, I was expecting something like that. It makes totally sense. I'm now sure. Thanks, R. LOPES Just programmer.

    C# csharp performance

  • Oject memory adress.
    G GriffonRL

    Hello, I'm looking for a way to get the memory adress of a C# object. Any idea is welcome :). Thanks, R. LOPES Just programmer.

    C# csharp performance

  • URLDownloadToFile fails (???) on 1 site
    G GriffonRL

    Hello, I'm trying to use URLDownloadToFile and a have a strange behaviour (and WebClient doesn't fit my needs): URLDownloadToFile(IntPtr.Zero,"http://www.kimo.com.tw",@"c:\test1.htm",0,IntPtr.Zero); <-- create the file URLDownloadToFile(IntPtr.Zero,"http://www.yahoo.com",@"c:\test2.htm",0,IntPtr.Zero); <-- create the file URLDownloadToFile(IntPtr.Zero,"http://www.boursorama.com",@"c:\test3.htm",0,IntPtr.Zero); <-- doesn't create the file (but no apparent failure returned from the function) Any idea ? Try by yourself. R. LOPES Just programmer.

    C# com question

  • UrlDownloadToFile strange behaviour
    G GriffonRL

    Hello, Thanks for answering but look at that: URLDownloadToFile(IntPtr.Zero,"http://www.kimo.com.tw",@"c:\test1.htm",0,IntPtr.Zero); <-- create the file URLDownloadToFile(IntPtr.Zero,"http://www.yahoo.com",@"c:\test2.htm",0,IntPtr.Zero); <-- create the file URLDownloadToFile(IntPtr.Zero,"http://www.boursorama.com",@"c:\test3.htm",0,IntPtr.Zero); <-- doesn't create the file Any idea ? Try by yourself. R. LOPES Just programmer.

    C# html com debugging help

  • UrlDownloadToFile strange behaviour
    G GriffonRL

    Hello, Thanks for answering but look at that: URLDownloadToFile(IntPtr.Zero,"http://www.kimo.com.tw",@"c:\test1.htm",0,IntPtr.Zero); <-- create the file URLDownloadToFile(IntPtr.Zero,"http://www.yahoo.com",@"c:\test2.htm",0,IntPtr.Zero); <-- create the file URLDownloadToFile(IntPtr.Zero,"http://www.boursorama.com",@"c:\test3.htm",0,IntPtr.Zero); <-- doesn't create the file Any idea ? Try by yourself. R. LOPES Just programmer.

    C# html com debugging help

  • UrlDownloadToFile strange behaviour
    G GriffonRL

    Hello, I have come across a strange behaviour. I typed the following code: [DllImport("urlmon.dll",CharSet=CharSet.Auto)] public static extern uint URLDownloadToFile( IntPtr pCaller, string szURL, string szFileName, uint dwReserved, IntPtr lpfnCB); string URL="http://www.boursorama.com"; URLDownloadToFile(IntPtr.Zero,URL,"c:\test.html",0,IntPtr.Zero); When I run it (using the debugger), the function doesn't seems to send back an error and the function seems actually to work but I get no local file ! I even looked at the HTTP requests and I can see the HTTP GET issued and the 200 OK response. I don't understand and I need UrlDownloadToFile (WebClient doesn't work with the IE cache). I'm using the 1.1 framework on Windows 2000 Professionnal. Thanks, R. LOPES Just programmer.

    C# html com debugging help

  • IDocHostUIHandler and InternetExplorer object.
    G GriffonRL

    Hello, I have been playing a lot with the WebBrowser control past weeks and I successfully implemented the IDocHostUIHandler interface with it. I'm now turning my focus to the InternetExplorer object. But I'm starting wondering if the IDocHostUIHandler interface works with this object. Until now I have got error when trying to cast the document object of the InternetExplorer object into a ICustomDoc object. The cast is invalid. Is it possible to use the IDocHostUIHandler interface with the InternetExplorer object ? And if so, how to do it if I can't use the ICustomDoc interface to set the UI handler. Thanks, R. LOPES Just programmer.

    C# design help tutorial question

  • Difference between Webbrowser contorl and InternetExplorer object ?
    G GriffonRL

    Hello, Can somebody point me out the differences between the webbrowser control and the internetexplorer object ? What are the purpose of each one ? Can you build the same applications with both ? Can they be embedded the same way ? Is one control offering more features than the other, including non-visual features (like more cookies stuff...) ? Thanks, R. LOPES Just programmer.

    COM hardware question

  • COMException "Requested resource in use"
    G GriffonRL

    Hello Stephane, Thank you very much indeed. I'm going to look into these objects. If you have any other idea or anybody else, feel free to post here. Thanks, R. LOPES Just programmer.

    C# help csharp html learning

  • COMException "Requested resource in use"
    G GriffonRL

    Hello, I'm using the WebBrowser control in an application in C#. I created an UserControl embedding the WebBrowser control. I have a form including one of this UserControl. I also have a thread that makes calls to the Navigate() method of the WebBrowser control. This thread automatically navigate to several hundred of pages and sites. It waits for several minutes for a page to load and then traverse its DOM. Everything works nicely but after a while (time vary, page involved too) I always get a COMExption error when calling the Navigate() method: "Requested resource is in use". I'm really stuck with this problem which compromise the program stability. Any help or ideas will be greatly welcome. Thanks, R. LOPES Just programmer.

    C# help csharp html learning

  • I need a documentation writing tool.
    G GriffonRL

    Hello, I agree with you. Doxygen is great. But it will be also great to have some kind of tool as described working with the .NET documentation system. Have a nice day, R. LOPES Just programmer.

    C# csharp c++ html css com

  • I need a documentation writing tool.
    G GriffonRL

    Hello, I don't know about any such tool but it could be really useful. Feel free to create one. It will be greatly appreciated :-D. Have a nice day, R. LOPES Just programmer.

    C# csharp c++ html css com

  • Webbrowser control and multithreading.
    G GriffonRL

    Hello Stephane, Thank you for your help. Do you have any idea on how to test that with VS .NET easely (if the instances are hosted by the same control) ? Thanks, R. LOPES Just programmer.

    C# csharp help question

  • Webbrowser control and multithreading.
    G GriffonRL

    Hello, I'm wondering if anybody managed to use the webbrowser control in a multithreaded application. I would like to have several browsers runnning in parrallel in the same program, but when I create several webbrowser controls and call the navigate() function of each of them to load different sites, it seems that if one of them is long or somewhat stuck it affects all the others. If I increase the number of webbrowser I get even more troubles. I'm doing my tests using C#. Has anybody tried this kind of solution ? Any experience will be welcome. Thanks, R. LOPES Just programmer.

    C# csharp help question

  • Webbrowser control annoying security alert dialogs
    G GriffonRL

    Thanks ! I will take a look. Regards, R. LOPES Just programmer.

    C / C++ / MFC javascript design security help tutorial
  • Login

  • Don't have an account? Register

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