Microsoft Windows CE 3.0  

InternetCrackUrl

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This function cracks a URL into its component parts.

BOOL WINAPI
InternetCrackUrl( 
IN
LPCTSTR
lpszUrl
,
IN
DWORD
dwUrlLength
,
IN
DWORD
dwFlags
,
IN LPURL_COMPONENTS
lpUrlComponents
);

Parameters

lpszUrl
Long pointer to a null-terminated string that contains the canonical URL to crack.
dwUrlLength
Specifies the length of the lpszUrlstring, or zero if lpszUrlis an ASCIIZ string.
dwFlags
Specifies the operation. It is one of the following values:
Value Description
ICU_DECODE Converts encoded characters back to their normal form. This can be used only if the user provides buffers in the URL_COMPONENTSstructure to copy the components into.
ICU_ESCAPE Converts all escape sequences (%xx) to their corresponding characters. This can be used only if the user provides buffers in the URL_COMPONENTSstructure to copy the components into.
lpUrlComponents
Long pointer to a URL_COMPONENTSstructure that receives the URL components.

Return Values

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError.

Remarks

Always directly call the ANSI version of this function, InternetCrackUrlA.

The required components are indicated by members of the URL_COMPONENTSstructure. Each component has a pointer to the value and has a member that stores the length of the stored value. If both the value and the length for a component are equal to zero, that component is not returned. If the pointer to the value of the component is NULL and the value of its corresponding length member is nonzero, the address of the first character of the corresponding component in the lpszUrlstring is stored in the pointer, and the length of the component is stored in the length member.

If the pointer contains the address of the user-supplied buffer, the length member must contain the size of the buffer. InternetCrackUrlcopies the component into the buffer, and the length member is set to the length of the copied component, minus 1 for the trailing string terminator.

For InternetCrackUrlto work properly, the size of the URL_COMPONENTSstructure must be stored in the dwStructSizemember.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Wininet.h   Wininet.lib
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

See Also

FtpOpenFile, GetLastError, InternetCloseHandle, InternetFindNextFile, InternetSetStatusCallback, URL_COMPONENTS