Skip to content

Latest commit

 

History

History
133 lines (102 loc) · 4.87 KB

nf-wininet-internetcreateurlw.md

File metadata and controls

133 lines (102 loc) · 4.87 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:wininet.InternetCreateUrlW
InternetCreateUrlW function (wininet.h)
Creates a URL from its component parts. (Unicode)
InternetCreateUrl
InternetCreateUrl function [WinINet]
InternetCreateUrlW
_inet_internetcreateurl_function
wininet.internetcreateurl
wininet/InternetCreateUrl
wininet/InternetCreateUrlW
wininet\internetcreateurl.htm
wininet
b01bb684-0b2f-4c17-ab32-9f83fdd89e69
12/05/2018
InternetCreateUrl, InternetCreateUrl function [WinINet], InternetCreateUrlA, InternetCreateUrlW, _inet_internetcreateurl_function, wininet.internetcreateurl, wininet/InternetCreateUrl, wininet/InternetCreateUrlA, wininet/InternetCreateUrlW
wininet.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
InternetCreateUrlW (Unicode) and InternetCreateUrlA (ANSI)
Wininet.lib
Wininet.dll
Windows
19H1
InternetCreateUrlW
wininet/InternetCreateUrlW
c++
APIRef
kbSyntax
DllExport
Wininet.dll
InternetCreateUrl
InternetCreateUrlA
InternetCreateUrlW

InternetCreateUrlW function

-description

Creates a URL from its component parts.

-parameters

-param lpUrlComponents [in]

Pointer to a URL_COMPONENTS structure that contains the components from which to create the URL.

-param dwFlags [in]

Controls the operation of this function. This parameter can be one or more of the following values.

Value Meaning
ICU_ESCAPE
Converts all unsafe characters to their corresponding escape sequences in the path string pointed to by the lpszUrlPath member and in lpszExtraInfo the extra-information string pointed to by the member of the URL_COMPONENTS structure pointed to by the lpUrlComponents parameter.

The Unicode version of InternetCreateUrl will first try to convert using the system code page. If that fails it falls back to UTF-8.

ICU_USERNAME
Obsolete — ignored.

-param lpszUrl [out]

Pointer to a buffer that receives the URL.

-param lpdwUrlLength [in, out]

Pointer to a variable that specifies the size of the URL lpszUrl buffer, in TCHARs. When the function returns, this parameter receives the size of the URL string, excluding the NULL terminator. If GetLastError returns ERROR_INSUFFICIENT_BUFFER, this parameter receives the number of bytes required to hold the created URL.

-returns

Returns TRUE if the function succeeds, or FALSE otherwise. To get extended error information, call GetLastError.

-remarks

When specifying scheme in the URL_COMPONENTS structure passed to lpUrlComponents, if lpszScheme is not NULL it will be used for the scheme. If lpszScheme is NULL, the scheme can be specified using the INTERNET_SCHEME enumeration by setting nScheme to the required INTERNET_SCHEME or INTERNET_SCHEME_DEFAULT.

Note  WinINet does not support server implementations. In addition, it should not be used from a service. For server implementations or services use Microsoft Windows HTTP Services (WinHTTP).
 

Note

The wininet.h header defines InternetCreateUrl as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

Handling Uniform Resource Locators

WinINet Functions