Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

IInternetProtocolInfo::QueryInfo returned buffer format

69 views
Skip to first unread message

Simon Scott

unread,
May 18, 2006, 7:34:01 AM5/18/06
to
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]

unread,
May 19, 2006, 5:51:57 AM5/19/06
to
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

unread,
May 19, 2006, 6:36:01 AM5/19/06
to
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

Luke Zhang [MSFT]

unread,
May 22, 2006, 1:53:05 AM5/22/06
to
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)

Simon Scott

unread,
May 22, 2006, 9:40:02 AM5/22/06
to
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

Luke Zhang [MSFT]

unread,
May 23, 2006, 2:05:30 AM5/23/06
to
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.
0 new messages