Getting start with IXMLHTTPRequest

Nikolay Sivov bunglehead at gmail.com
Sun Feb 7 20:36:59 CST 2010


On 2/8/2010 05:24, Jacek Caban wrote:
> On 2/7/10 3:08 PM, Nikolay Sivov wrote:
>> On 2/7/2010 16:45, Hans Leidekker wrote:
>>> On Sunday 07 February 2010 14:28:37 Nikolay Sivov wrote:
>>>
>>>> Recently I tried to start with this interface. It looks trivial enough
>>>> but since it's first time i'm using winhttp,
>>>> there could be some problems, especially cause IXMLHTTPRequest 
>>>> supports
>>>> asynchronous requests.
>>>>
>>>> Could someone with winhttp knowledge review this patch before it 
>>>> goes to
>>>> far from reality?
>>>>
>>>> P.S. any comments are welcome actually.
>>> Last time this came up Jacek suggested to use urlmon instead of 
>>> winhttp,
>>> which may already handle asynchronous requests.
>>>
>>>   -Hans
>> Such things:
>> ---
>> static HRESULT WINAPI HttpInfo_QueryInfo(IWinInetHttpInfo *iface, 
>> DWORD dwOption,
>>         void *pBuffer, DWORD *pcbBuffer, DWORD *pdwFlags, DWORD 
>> *pdwReserved)
>> {
>>     HttpProtocol *This = INETINFO_THIS(iface);
>>     FIXME("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, 
>> pcbBuffer, pdwFlags, pdwReserved);
>>     return E_NOTIMPL;
>> }
>> ---
>> static HRESULT WINAPI HttpProtocol_Abort(IInternetProtocol *iface, 
>> HRESULT hrReason,
>>         DWORD dwOptions)
>> {
>>     HttpProtocol *This = PROTOCOL_THIS(iface);
>>     FIXME("(%p)->(%08x %08x)\n", This, hrReason, dwOptions);
>>     return E_NOTIMPL;
>> }
>> ---
>> make me think it's not ready.
>
> Even if that's true, it's not a reason to choose wrong architecture.
Let's say we have a WinHttpRequest object that works, it provides 
similar interface as IXMLHTTP.
Why should I use urlmon for that? WinHttpRequest should stay in winhttp, 
and won't use urlmon.
>
>> Also IXMLHTTPRequest methods look to directly map tp Winhttp calls.
>> For example how can I implement IXMLHTTPRequest::setRequestHeader() 
>> with urlmon?
>
> By implementing IHttpNegotiate on bind status callback.
Thanks, will take a look.
>
>> Btw, what was a reason for using it?
>
> Everything IE-related should use it for binding. It's because of 
> plugable protocols, shared wininet session and more. urlmon is not 
> just a wrapper around wininet.
Why IXMLHTTPRequest is IE related? Or you mean that anything that uses 
internet should go through urlmon?
>
>
> Jacek
>
>
>




More information about the wine-devel mailing list