Discussion:
IInternetProtocolInfo::QueryInfo returned buffer format
(too old to reply)
Simon Scott
2006-05-18 11:34:01 UTC
Permalink
Hi,

Would anybody know exactly what should be returned in the output buffer for
this call? For instance, option QUERY_CAN_NAVIGATE is documented to return a
boolean result, but there is no discussion of how that boolean should be
formatted into the output buffer.
--
Regards
Simon
Luke Zhang [MSFT]
2006-05-19 09:51:57 UTC
Permalink
Hello Simon,

I think the format of buffer data depends on the query options you send to
the interface, it may be a pointer to a bool value, SYSTEMTIME, or string:

http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/monik
er/reference/enums/queryoption.asp

Regards,

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Simon Scott
2006-05-19 10:36:01 UTC
Permalink
Yes, accepted that the format depends on the option, but what is the format?
If I want to respond to the QUERY_CAN_NAVIGATE option, how do I format a
boolean true or false into the buffer?
--
Regards
Simon
Post by Luke Zhang [MSFT]
Hello Simon,
I think the format of buffer data depends on the query options you send to
http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/monik
er/reference/enums/queryoption.asp
Regards,
Luke Zhang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Luke Zhang [MSFT]
2006-05-22 05:53:05 UTC
Permalink
Just a quick guess, it should be a pointer to a bool value you get from
QueryInfo:

HRESULT QueryInfo( LPCWSTR pwzUrl,
QUERYOPTION OueryOption,
DWORD dwQueryFlags,
LPVOID pBuffer,
DWORD cbBuffer,
DWORD *pcbBuf,
DWORD dwReserved
);

pBuffer is pointer to the bool value. ( you may get the actual size of
returned value from *pcbBuf)

Regards,

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Simon Scott
2006-05-22 13:40:02 UTC
Permalink
Ahh, I think I have not made clear that I am trying to implement QueryInfo()
in my protocol handler - not call it. So you see I need to know how to
respond to the call from MSHTML.
By looking at the disassembly from a breakpoint, it looks like MSHTML calls
CoInternetQueryInfo which eventually calls my QueryInfo(). And it looks like
MSHTML provides a four-byte buffer and tests it to see if its all zeroes or
not. So I guess I should return a 4-byte BOOL in the buffer.

BTW, what is QUERY_CAN_NAVIGATE actually asking? The documentation says
"Check if the protocol can navigate.". But what does that actually mean? What
is the difference between a protocol that "can navigate" and one that can't?
--
Regards
Simon
Post by Luke Zhang [MSFT]
Just a quick guess, it should be a pointer to a bool value you get from
HRESULT QueryInfo( LPCWSTR pwzUrl,
QUERYOPTION OueryOption,
DWORD dwQueryFlags,
LPVOID pBuffer,
DWORD cbBuffer,
DWORD *pcbBuf,
DWORD dwReserved
);
pBuffer is pointer to the bool value. ( you may get the actual size of
returned value from *pcbBuf)
Regards,
Luke Zhang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Luke Zhang [MSFT]
2006-05-23 06:05:30 UTC
Permalink
As I understand, QUERY_CAN_NAVIGATE means we can communicate with the
target server correctly. It will return false if the server is not able to
reach, for example, a port was disabled or the network is disconnected.

Regards,

Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Loading...