You must use CoInternetParseUrl () with URL_ENCODE.
Sample from MSDN, modified for your purposes. Of course, you will have to figure out how to call CoInternetParseUrl () from VB6, but you seem to be on the way to this.
#include <wininet.h>
WCHAR encoded_url[INTERNET_MAX_URL_LENGTH];
DWORD encoded_url_len = ARRAYSIZE(encoded_url);
HRESULT hr = CoInternetParseUrl(url, PARSE_CANONICALIZE, URL_ENCODE, encoded_url,
INTERNET_MAX_URL_LENGTH, & encoded_url_len, 0);
if (SUCCEEDED(hr)) {
}
PARSE_ENCODE PARSE_CANONICALIZE, .
, google-url. , ++, COM.