TranslateURL function
Applies common translations to a given URL string, creating a new URL string.
Syntax
HRESULT WINAPI TranslateURL( LPCSTR pcszURL, DWORD dwInFlags, LPSTR *ppszTranslatedURL );
Parameters
- pcszURL
-
Address of the URL string to be translated.
- dwInFlags
-
Bit flags that specify how the URL string is to be translated. This value can be one or more of the following:
- ppszTranslatedURL
-
Address of the pointer to the newly created, translated URL string, if any. The ppszTranslatedURL parameter is valid only if the function returns S_OK.
Return value
Returns one of the following values:
| Return code | Description |
|---|---|
|
The URL was translated successfully. |
|
The URL did not require translation. |
|
The flag combination passed in dwInFlags is invalid. |
|
There was insufficient memory to complete the operation. |
|
One of the input pointers is invalid. |
Remarks
TranslateURL changes the protocol of the URL based on the flags set in dwInFlags. This function does not validate the input URL string. A successful return value does not indicate that the URL strings are valid URLs.
Requirements
|
Minimum supported client |
Windows XP |
|---|---|
|
Minimum supported server |
Windows 2000 Server |
|
Header |
|
|
DLL |
|
|
Unicode and ANSI names |
TranslateURLW (Unicode) and TranslateURLA (ANSI) |