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
N

Nirav Doshi

@Nirav Doshi
About
Posts
79
Topics
19
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Can I embed an ActiveX control in a ASP.NET MVC View?
    N Nirav Doshi

    Hi, I'm trying to embed an ActiveX control in a website developed using the Sharp (S#arp) Architecture Framework[^], which leverages the ASP.NET MVC Framework & NHibernate. However, I'm struggling to get it to work. :sigh: Is it possible to embed an ActiveX control? I'm also thinking of an alternative, where I could add a Web form to the project & that could contain the ActiveX. (I suppose it should work). Any alternative ideas if its not possible to embed an ActiveX control in a ASP.NET MVC view? Thanks, ND

    * Blood donation is the superior'est form of donation, it can save lives. Celebrate special occasions, like your birthdays, by donating blood. *

    ASP.NET asp-net architecture csharp com question

  • Has the time come for development on a virtual machine?
    N Nirav Doshi

    I currently have 3 VMs on my machine (a Dell Precision M90 - bought around Feb-Mar 2007) running VistaUltimate64 (100GB HDD, 4GB RAM). - The main VM (10GB HDD, 1GB RAM) runs a Win2K3 Server. I use VisualStudio2008 on the Vista64 and VisualStudio6 (VS6) on the Win2K3 VM - because Vista64 doesn't allow to install VS6. BTW, I *need* the VS6 for some legacy purpose - and the VM here comes to my rescue here, instead of needing a seperate computer just for the VS6! :cool: The speed is good & the machine is pretty responsive, even if something on the Vista goes into "Not Responding" mode. - I've recently also setup an Ubuntu VM (5GB HDD, 512MB RAM)- and have just started some work on it too. Its pretty good, even with the low resources. - The third VM I have, runs MS-DOS 6.22 (Yes!) (512MB HDD, 4MB RAM). I have some classic DOS Games & utils there on it. :rolleyes: And I've also tried to have all the 3 VMs running simultaneously -> i.e. 4 machines in all... It worked. Didn't experiment further. ;P

    * Blood donation is the superior'est form of donation, it can save lives. Celebrate special occasions, like your birthdays, by donating blood. *

    The Lounge java asp-net linux hosting testing

  • Congratulations to India!
    N Nirav Doshi

    suhredayan wrote:

    I only said I was proud of that.

    Your original comment did not sound like that. Also - the article clearly mentioned it was done as a form of protest. Otherwise bullock carts aren't used for transport in the city. Anyway - as both of us are proud of our country, let this argument RIP.

    * Blood donation is the superior'est form of donation, it can save lives. Celebrate special occasions, like your birthdays, by donating blood. *

    The Lounge

  • Congratulations to India!
    N Nirav Doshi

    Sorry! I'm in Bangalore for the last 5+ yrs., never seen even one on the city roads. My point was - India has changed, Indians have too - in our own way. A majority of India doesn't ride on bullock carts today. Our house maid has a cellphone, just like my newspaper delivery boy. They're aware of the Chandrayaan-I - whose main control room is in Bidar - just a few kilometers away from Bangalore city. The Tata Nano is undergoing its final road tests, while Honda reduced the price of the Honda Civic Hybrid by 8+ Lakhs! <quote> Chandrayaan-I cost ISRO US$80 million ($120.193 million), compared to Japan's Selene mission's US$480 million, or China's Change-E1 mission that cost US$187 million. The European Space Agency's (ESA) Small Mission for Advanced Research in Technology (SMART-1) in 2003 cost US$140 million. </quote>

    * Blood donation is the superior'est form of donation, it can save lives. Celebrate special occasions, like your birthdays, by donating blood. *

    The Lounge

  • Congratulations to India!
    N Nirav Doshi

    Yeah, the same one Bollywood had rented out to NASA in 1969. ;) ;P :laugh:

    * Blood donation is the superior'est form of donation, it can save lives. Celebrate special occasions, like your birthdays, by donating blood. *

    The Lounge

  • Congratulations to India!
    N Nirav Doshi

    suhredayan wrote:

    this is from a place where a large part still depends on bullock carts

    Seems like its been decades since you flew down to India. :doh: ;)

    * Blood donation is the superior'est form of donation, it can save lives. Celebrate special occasions, like your birthdays, by donating blood. *

    The Lounge

  • Pause / Break
    N Nirav Doshi

    When they're at it, they should disable all the keys and we can have a BSOD-free Windows(R)! ;-)

    * Blood donation is the superior'est form of donation, it can save lives. Celebrate special occasions, like your birthdays, by donating blood. *

    The Lounge question

  • Launching multiple IE [modified]
    N Nirav Doshi

    Thanks! Yes, that's what is to be done. 100 browsers, running 100 user accounts simultaneously, automated. :-)

    * Blood donation is the superior'est form of donation, it can save lives. Celebrate special occasions, like your birthdays, by donating blood. *

    COM c++ com testing collaboration beta-testing

  • Launching multiple IE [modified]
    N Nirav Doshi

    Finally, a good friend (Nanda) was able to help with this, and got the code below WORKING! This is how to get IWebBrowser2 from IHTMLDocument2. Pasting code below for anyone who may need this. I had a very tough week wrestling with this, don't want anyone else to go through the same. :-)

    CComQIPtr<IOleObject> spOleObject; // IOleObject
    CComQIPtr<IOleClientSite> spOleClientSite; // IOleClientSite
    CComQIPtr<IServiceProvider> spServiceProvider; // IServiceProvider
    ...
    ... // Code here as per How to get IHTMLDocument2 from a HWND[^]
    ...
    HRESULT hRes = spHTMLDoc2->QueryInterface(IID_IOleObject, reinterpret_cast<void **>(&spOleObject));
    if (SUCCEEDED(hRes))
    {
    hRes = spOleObject->GetClientSite(&spOleClientSite);
    if(SUCCEEDED(hRes))
    {
    hRes = spOleClientSite->QueryInterface(IID_IServiceProvider, reinterpret_cast<void **>(&spServiceProvider));
    if(SUCCEEDED(hRes))
    {
    hRes = spServiceProvider->QueryService(SID_SWebBrowserApp,IID_IWebBrowser2, reinterpret_cast<void **>(&spWebBrowser));
    }
    if(SUCCEEDED(hRes))
    {
    BSTR oURL;
    oURL = SysAllocString(L"http://www.google.com");
    VARIANT var;
    var.vt = VT_EMPTY;

    		spWebBrowser->Navigate((BSTR)oURL, &var, &var, &var, &var);
    		SysFreeString(oURL);
    	}
    }
    

    }

    Thanks a ton Nanda! :cool:

    * Blood donation is the superior'est form of donation, it can save lives. Celebrate special occasions, like your birthdays, by donating blood. *

    COM c++ com testing collaboration beta-testing

  • Launching multiple IE [modified]
    N Nirav Doshi

    The reason for several copies of IE is purely for the visiting site's session management. New Windows don't allow a new session as well as multiple copies of the same IEXPLORE binary (different process). Hence the need to make multiple self-sustained copies of IE. Thanks!

    * Blood donation is the superior'est form of donation, it can save lives. Celebrate special occasions, like your birthdays, by donating blood. *

    COM c++ com testing collaboration beta-testing

  • Launching multiple IE [modified]
    N Nirav Doshi

    Mike, thanks for the confirmation! :-) I'm still stuck up in a problem, posted above. Any ideas there? :doh:

    * Blood donation is the superior'est form of donation, it can save lives. Celebrate special occasions, like your birthdays, by donating blood. *

    COM c++ com testing collaboration beta-testing

  • Launching multiple IE [modified]
    N Nirav Doshi

    Stuck up once again! :( I've used the code & concept as given at: How to get IHTMLDocument2 from a HWND[^] With that, though I have a valid CComPtr<IHTMLDocument2> spHTMLDoc2, (valid because the spHTMLDoc2->put_bgColor(CComVariant("blue")) works fine) the get_parentWindow() doesn't work and gets a 0x00000000 in the spHTMLWindow2. Is there something wrong with the way I'm doing this?

    spHTMLDoc2->put_bgColor(CComVariant("blue"));

    CComPtr<IHTMLWindow2> spHTMLWindow2;
    hr = spHTMLDoc2->get_parentWindow(&spHTMLWindow2);

    Thanks!

    * Blood donation is the most superior form of donation, it can save lives. Celebrate special occasions, like your birthdays, by donating blood. *

    modified on Saturday, June 14, 2008 2:16 AM

    COM c++ com testing collaboration beta-testing

  • Launching multiple IE [modified]
    N Nirav Doshi

    I think I can use the concept from: How to get IHTMLDocument2 from a HWND[^] Since the method needs a HWND, I need to write a PIDtoHWND() after I do the CreateProcess() which will get me only the PID. Phew... I hope this works! Yet to test it. Thanks, nd

    COM c++ com testing collaboration beta-testing

  • Launching multiple IE [modified]
    N Nirav Doshi

    Hi, For a particular requirement, currently my testing team has isolated multiple copes of IE5.5 (in seperate folders with *all* the required DLLs within that folder). They launch multiple copies (sometimes upto 100) of the IE5.5 for their testing to allow individual sessions. I'm trying to automate this, and for the same (with my very limited knowledge of COM) am trying to do the following. Please help me here to tell me if I am on the right track?: 1. I have a dialog based MFC app can launch each of the 100 different copies of IE 5.5 from their individual 100 folders using CreateProcess() 2. In the app I'm also doing (only once - I suppose this is primarily required for generating the TLH/TLI files):

    #import "C:\IE Copies\IE551-1\SHDOCVW.DLL"
    

    Doubt: As each of the 100 folders containing the IE5.5 have their own SHDOCVW.DLL, do I need to import them individually, or should this suffice? 3. After the IEs are running, next I need to "reach" their individual IWebBrowser2 interfaces (exposed by their SHDOCVW.DLL) so that I can invoke the navigation methods to automate visiting sites, logging in, etc. Please note - The IEs are *not* registered with the system (obviously) - and so the usual methods may not work. Doubt: Is there some way I can use CoCreateInstance() such that I can launch each of the IE5 copies, even though they're not registered on the system. Sorry - if this sounds crude/crazy... I'd really appreciate if you can suggest a solution to this -- or even a more appropriate/elegant method to get this going. Thanks a lot in advance, for your time & efforts. Rgds, nd

    modified on Thursday, June 5, 2008 2:31 PM

    COM c++ com testing collaboration beta-testing

  • Peculiar Exception
    N Nirav Doshi

    Hello, I'm receiving this very peculiar warning, after which my application crashes.

    Warning: constructing COleException, scode = severity: SEVERITY_ERROR, facility: FACILITY_WIN32 ($800706BE).
    

    I'm using Windows XP with SP2. The same application works fine on Windows 2000 SP4. Googling didn't help at all... Hence posting this query here, just if anyone is aware of or has encountered this error and has some solution for the same. Thanks, Nirav * Artificial intelligence is no match for natural stupidity! *

    COM help database regex

  • stupid question ?
    N Nirav Doshi

    ZoiD wrote: How many lines of code should a developer (c/c++) write on average each day ? Our CTO once told us that Motorola has done some internal study and it seems the lines per day of a programmer is about 130 (regardless of the language and logic/algorithm). This is an average calculation for a month's work or so! A similar benchmark is used by some companies for getting to some productivity metrics of their programming team. These lines are supposed to be complete (as per the requirement specs), optimized (no redundant code) & bug-free (as per the requirement specs) lines of code. - Nirav - * Artificial intelligence is no match for natural stupidity! *

    The Lounge question c++ design algorithms tutorial

  • MS-SOAP TK &amp; SSL/HTTPS problem
    N Nirav Doshi

    Hello, I am trying the following code with MS-SOAP Toolkit v3.0:

     Dim oConnector As New HttpConnector30
     Dim oSerializer As New SoapSerializer30
     Dim oReader As New SoapReader30
    
     oConnector.Property("EndPointURL") = "https://172.16.1.95/Service1.asmx"
     oConnector.Property("WinHTTPAuthScheme") = 8
     oConnector.Property("UseSSL") = True
     oConnector.Property("SSLClientCertificateName") = "CURRENT_USER\MY\Nirav"
     oConnector.Connect
    
     oConnector.Property("SoapAction") = "https://172.16.1.95/HelloWorld"
     oConnector.BeginMessage
     ...                                 ' serializing the SOAP message here
     oConnector.EndMessage               ' Gives the ERROR here!
    

    But even though the same works perfectly with "http://", it is giving the following error with "https://" - -------------------------------------------------------

    Runtime error '5400'
    Connector: SSL certificate common name (host name field) is incorrect HRESULT=0x800A1529 - Connector: Unspecified HTTP error. HRESULT=0x800A1518

    ------------------------------------------------------- Since the same service works fine if I invoke it from my IE6, I suppose the certificate should be fine. But this is something mysterious, and no material about this error... :confused: Am I doing something wrong? Please suggest me a solution for this... Thanks a lot! Rgds, Nirav * Artificial intelligence is no match for natural stupidity! *

    XML / XSL help wcf security cryptography

  • CString to Numeric Value
    N Nirav Doshi

    Is possible, please let me know if this helped, or if it gave you any further problems! * Artificial intelligence is no match for natural stupidity! *

    C / C++ / MFC tutorial

  • A help with Hooking some APIs and also Boot Sector Reading..
    N Nirav Doshi

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/createfile.asp[^] * Artificial intelligence is no match for natural stupidity! *

    C / C++ / MFC c++ help tutorial

  • A help with Hooking some APIs and also Boot Sector Reading..
    N Nirav Doshi

    Radwan Aladdin wrote: Any links on the net please? You can google for CreateFile(), or even search MSDN Online[^] for the same. Radwan Aladdin wrote: What can I do with this?? I mean can I then read the Boot Master Records?? YES! That (I suppose) is the ONLY possible method. * Artificial intelligence is no match for natural stupidity! *

    C / C++ / MFC c++ 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