Joe Strazzere - All Things Quality

Visit my new blog at http://strazzere.blogspot.com/


December 1, 2005 - WinTask - UrlEscape

Posted in WinTask

'
' UrlEscape - Converts characters in a URL that might be altered during transport across the Internet
'     ("unsafe" characters) into their corresponding escape sequences.
'

' Author: Joe Strazzere

'


Dim OldURL as unsigned
Dim NewURL as unsigned
Dim count as unsigned
Dim flags as unsigned

 

OldURL=Allocate(100)
NewURL=Allocate(100)
Count=Allocate(100)
Flags=Allocate(100)

 

PokeString(OldURL,"http://www.zapdata.com/arg=A B C",1)
'PokeString(OldURL,"This is a test",1)
PokeString(NewURL,"                                                                                                    ",1)

PokeInteger(Count,100,4)  ' the intial length of NewURL goes here, the new length is returned here
PokeInteger(Flags,0,4)

 

ret=External("shlwapi.dll","UrlEscapeA",OldURL,NewURL, count, flags)

msgbox(ret)

 

ret=PeekInteger(count,4)
NewURL$=PeekString$(NewURL)
msgbox(Str$(ret)+" characters ="+NewURL$)


<- Last Page :: Next Page ->

About Me

A gathering place for information and ideas about Quality Assurance, Testing, and other useful topics.

Problems cannot be solved by the same level of thinking that created them. - A. Einstein

Search This Site

Translate This Site

RSS Feed

Subscribe

Twitter

@jstrazzere

Categories

Life
QA
Sports
Tools
WinTask
Work in General

What I'm Reading Now