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.
A version of this page is also available for
4/8/2010

This structure contains the constituent parts of a URL. This structure is used with the InternetCrackUrland InternetCreateUrlfunctions.

Syntax

typedef struct {
  DWORD 
dwStructSize;
  LPTSTR 
lpszScheme;
  DWORD 
dwSchemeLength;
  INTERNET_SCHEME 
nScheme;
  LPTSTR 
lpszHostName;
  DWORD 
dwHostNameLength;
  INTERNET_PORT 
nPort;
  LPTSTR 
lpszUserName;
  DWORD 
dwUserNameLength;
  LPTSTR 
lpszPassword;
  DWORD 
dwPasswordLength;
  LPTSTR 
lpszUrlPath;
  DWORD 
dwUrlPathLength;
  LPTSTR 
lpszExtraInfo;
  DWORD 
dwExtraInfoLength;
} URL_COMPONENTS, *LPURL_COMPONENTS;

Members

dwStructSize

Unsigned long integer value that contains the size, in bytes, of this structure. This member is used for version checking. The size of this structure must be set to initialize this structure properly.

lpszScheme

Pointer to a string value that contains the scheme name.

dwSchemeLength

Unsigned long integer value that contains the length of the scheme name in TCHAR.

nScheme

INTERNET_SCHEME value that indicates the Internet protocol scheme.

lpszHostName

Pointer to a string value that contains the host name.

dwHostNameLength

Unsigned long integer value that contains the length of the host name in TCHAR.

nPort

Converted port number.

lpszUserName

Pointer to a string value that contains the user name.

dwUserNameLength

Unsigned long integer value that contains the length of the user name in TCHAR.

lpszPassword

Pointer to a string value that contains the password.

dwPasswordLength

Unsigned long integer value that contains the length of the password in TCHAR.

lpszUrlPath

Pointer to a string value that contains the URL path.

dwUrlPathLength

Unsigned long integer value that contains the length of the URL path in TCHAR.

lpszExtraInfo

Pointer to a string value that contains the extra information (for example, ?something or #something).

dwExtraInfoLength

Unsigned long integer value that contains the length of the extra information in TCHAR.

Remarks

For InternetCrackUrl, if a pointer member and its corresponding length member are both zero, that component is not returned. If the pointer member is NULL but the length member is nonzero, both the pointer and length members are returned. If both pointer and corresponding length members are nonzero, the pointer member points to a buffer where the component is copied. The component can be un-escaped, depending on the dwFlagsparameter of InternetCrackUrl.

For InternetCreateUrl, the pointer members should be NULL if the component is not required. If the corresponding length member is zero, the pointer member is the address of a null-terminated string. If the length member is not zero, it is the string length of the corresponding pointer member.

Requirements

Header wininet.h
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also