Microsoft HomeproductssearchsupportshopWrite Us   Microsoft Home
Magazine
 |  Community
 |  Workshop
 |  Tools & Samples
 |  Training
 |  Site Info

Workshop  |  Networking, Protocols & Data Formats

URL_COMPONENTS Structure


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

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%;

The actual syntax of this structure varies between its ANSI and Unicode implementations. See the Win32 Internet Functions Syntax document for details.

Members

dwStructSize
Unsigned long integer value that contains the 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 string value that contains the scheme name.
dwSchemeLength
Unsigned long integer value that contains the length of the scheme name.
nScheme
INTERNET_SCHEME value that indicates the Internet protocol scheme.
lpszHostName
Address of a string value that contains the host name.
dwHostNameLength
Unsigned long integer value that contains the length of the host name.
nPort
Converted port number.
lpszUserName
Address of a string value that contains the user name.
dwUserNameLength
Unsigned long integer value that contains the length of the user name.
lpszPassword
Address of a string value that contains the password.
dwPasswordLength
Unsigned long integer value that contains the length of the password.
lpszUrlPath
Address of a string value that contains the URL path.
dwUrlPathLength
Unsigned long integer value that contains the length of the URL path.
lpszExtraInfo
Address of 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.

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 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 can 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.

Structure Information

Windows NT Use version 4.0 and later. Implemented as ANSI and Unicode structures.
Windows Use Windows 95 and later. Implemented as ANSI and Unicode structures.
Header Wininet.h
Minimum availability Internet Explorer 3.0 (ANSI only), 5 (ANSI and Unicode)

Does this content meet your programming needs? Write us!

Back to topBack to top

© 1998 Microsoft Corporation. All rights reserved. Terms of use.

 

Magazine Home
Ask Jane
DHTML Dude
Extreme XML
For Starters
More or Hess
Servin' It Up
Site Lights
Web Men Talking
Member Community Home
Benefits: Freebies & Discounts
Benefits: Promote Your Site
Benefits: Connect with Your Peers
Benefits at a Glance
Online Special-Interest Groups
Your Membership
SBN Stores
Join Now
Workshop Home
Essentials
Content & Component Delivery
Component Development
Data Access & Databases
Design
DHTML, HTML & CSS
Extensible Markup Language (XML)
Languages & Development Tools
Messaging & Collaboration
Networking, Protocols & Data Formats
Reusing Browser Technology
Security & Cryptography
Server Technologies
Streaming & Interactive Media
Web Content Management
Workshop Index
Tools & Samples Home
Tools
Samples, Headers, Libs
Images
Sounds
Style Sheets
Web Fonts
Training Home
SBN Live Seminars
SBN Live Chats
Courses
Peer Support
CD-ROM Training
Books & Training Kits
Certification
SBN Home
New to SBN?
What's New on SBN
Site Map
Site Search
Glossary
Write Us
About This Site