developer28
2010-01-07 14:34:07 UTC
Hi,
Forgive me if this question sounds trivial but i am not an expert at
WinHttp API's.
I am actually doing directory browsing over http and copying files to
the client machine.
One such path is of this form:
http://myserver/Office/Programs/My Program/VC#/VCSPackages/1035/
proj.dll"
I would like to emphasize on the "VC#" component in the path above.
When i pass the above path to the WinHttpCrackUrl function, it
generates following url components:
path = http://myserver/Office/Programs/My Program/VC
extrainfo = #/VCSPackages/1033/proj.dll
As you can see, everything in the path that succeeds the pound (#)
sign is put into extra info. I understand that the pound sign acts as
the "Fragment Identifier" in Urls.
But in my case this is a valid character since it leads to a folder
named "VC#". But i'm unable to go to the folder since WinHttpCrackUrl
treats it as special.
Please let me know how i can make WinHttpCrackUrl keep the whole data
into the path variable instead of putting a part of it into the
extrainfo. Or if somehow i can tell it not to treat the pound sign as
special.
I see the same behaviour on using both IDU_DECODE and IDU_ESCAPE.
Any other alternate solution is also most welcome.
Renaming the folder is not an option that i have.
Thanks for any help.
Regards,
Aman
Forgive me if this question sounds trivial but i am not an expert at
WinHttp API's.
I am actually doing directory browsing over http and copying files to
the client machine.
One such path is of this form:
http://myserver/Office/Programs/My Program/VC#/VCSPackages/1035/
proj.dll"
I would like to emphasize on the "VC#" component in the path above.
When i pass the above path to the WinHttpCrackUrl function, it
generates following url components:
path = http://myserver/Office/Programs/My Program/VC
extrainfo = #/VCSPackages/1033/proj.dll
As you can see, everything in the path that succeeds the pound (#)
sign is put into extra info. I understand that the pound sign acts as
the "Fragment Identifier" in Urls.
But in my case this is a valid character since it leads to a folder
named "VC#". But i'm unable to go to the folder since WinHttpCrackUrl
treats it as special.
Please let me know how i can make WinHttpCrackUrl keep the whole data
into the path variable instead of putting a part of it into the
extrainfo. Or if somehow i can tell it not to treat the pound sign as
special.
I see the same behaviour on using both IDU_DECODE and IDU_ESCAPE.
Any other alternate solution is also most welcome.
Renaming the folder is not an option that i have.
Thanks for any help.
Regards,
Aman