URL_COMPONENTSURL_COMPONENTS*
*Contents  *Index  *Topic Contents
*Previous Topic: INTERNET_VERSION_INFO
*Next Topic: API Flags

URL_COMPONENTS

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

Contains the constituent parts of a URL. This structure is used with the InternetCrackUrl and InternetCreateUrl functions.

dwStructSize
Size, in bytes, of this structure. Used for version checking. The size of this structure must be set to initialize this structure properly.
lpszScheme
Address of a buffer that contains the scheme name.
dwSchemeLength
Length of the scheme name.
nScheme
Enumerated scheme type, if known. For a list of scheme types, see INTERNET_SCHEME.
lpszHostName
Address of a buffer that contains the host name.
dwHostNameLength
Length of the host name.
nPort
Converted port number.
lpszUserName
Address of a buffer that contains the user name.
dwUserNameLength
Length of the user name.
lpszPassword
Address of a buffer that contains the password.
dwPasswordLength
Length of the password.
lpszUrlPath
Address of a buffer that contains the URL path.
dwUrlPathLength
Length of the URL path.
lpszExtraInfo
Address of a buffer that contains the extra information (for example, ?foo or #foo).
dwExtraInfoLength
Length of the extra information.

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 not zero, 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 may be un-escaped, depending on the dwFlags parameter 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 zero-terminated string. If the length member is not zero, it is the string length of the corresponding pointer member.


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.