dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 11 of 11

Thread: MSXML send issues

  1. #1
    Join Date
    Dec 2018
    Posts
    6

    MSXML send issues

    I get an exception when i try to send a Httprequest:

    HRESULT IXMLHttpRequest::send ( const _variant_t & varBody ) {
    HRESULT _hr = raw_send(varBody);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _hr;
    }

    When I debug the code, here the "raw_send" function returns -2146697208 for _hr...
    I am able to open and establish a connection

    By the way:
    getlasterror() returns 0

    Any idea?
    Your help is highly appreciated!

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    12,990

    Re: MSXML send issues

    Please show the complete code snippet and use code tags. Where does raw_send come from? It isn't a method of the IHttpXMLRequest interface?

  3. #3
    Join Date
    Dec 2018
    Posts
    6

    Re: MSXML send issues

    hr = pXMLHTTPReq.CreateInstance(__uuidof(MSXML2::XMLHTTP30));
    hr = pXMLHTTPReq->open(_bstr_t(_T("GET")), _bstr_t(URL), _variant_t(VARIANT_FALSE));
    hr = pXMLHTTPReq->setRequestHeader(_bstr_t(_T("Content-Type")), _bstr_t(_T("application/xml")));
    hr = pXMLHTTPReq->setRequestHeader(_bstr_t(_T("charset")), _bstr_t(_T("UTF-8")));
    hr = pXMLHTTPReq->send(NULL);

    in the last line i.e. send, when I debug the code through F11 "this is VC++" I land in the function which I had mentioned i.e. raw_send. There I get the exception...

  4. #4
    Join Date
    Dec 2018
    Posts
    6

    Re: MSXML send issues

    it is from the file "msxml3.tli"

  5. #5
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,600

    Re: MSXML send issues

    Quote Originally Posted by Abe000 View Post
    When I debug the code, here the "raw_send" function returns -2146697208 for _hr...
    I am able to open and establish a connection
    0x800c0008-error-code

    The 0x800c0008 Error Code error is the result of Microsoft Windows system file damage.
    Best regards,
    Igor

  6. #6
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    12,990

    Re: MSXML send issues

    @OP. To verify if the error that Igor referred to is the issue, run the software on another machine.

  7. #7
    Join Date
    Dec 2018
    Posts
    6

    Re: MSXML send issues

    Hi everybody, I just did run the software on another machine running Win10, there is no problem at all! The mentioned error occurs only on Win7...

  8. #8
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    12,990

    Re: MSXML send issues

    Quote Originally Posted by Abe000 View Post
    Hi everybody, I just did run the software on another machine running Win10, there is no problem at all! The mentioned error occurs only on Win7...
    According to the error, the Windows install is corrupt or has other issues. Is it a genuine, registered Windows install?

  9. #9
    Join Date
    Dec 2018
    Posts
    6

    Re: MSXML send issues

    @ Arjay, as I said the only problem is seen on Win7 "different machines with registered Windows". How did you come up with your comment? That would be interesting ...

  10. #10
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    12,990

    Re: MSXML send issues

    Quote Originally Posted by Abe000 View Post
    @ Arjay, as I said the only problem is seen on Win7 "different machines with registered Windows". How did you come up with your comment? That would be interesting ...
    The error code indicated an issue with Windows. Does this error occur with an invalid version? I don't know, but I figure I would suggest that possibility (without of course knowing what you are running). At any rate, my comment is an attempt at helping you troubleshoot the issue. Nothing more, nothing less. I would suggest doing a windows repair to see if that fixes the issue.
    Last edited by Arjay; December 27th, 2018 at 10:31 PM.

  11. #11
    Join Date
    Dec 2018
    Posts
    6

    Re: MSXML send issues

    @ Arjay, thanks for the comment. I installed Win7 and Win10 on 2 different machines & registered them and I did run the windows repair with latest service pack. However, the problem still exists.

    @ all, I think the problem must have to do with the fact, that the target URL being updated at a high frequency, making it being not available for some period, because I encounter the same problem sometimes "very rare however" even on Win10.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)