 |
WinHttpConnect Add comment W32 Constants Translate this page |
 |
 |
|
Specifies the initial target server of an HTTP request and returns an HINTERNET connection handle to an HTTP session for that initial target. |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
HINTERNET WinHttpConnect(
HINTERNET hSession,
LPCWSTR pswzServerName,
INTERNET_PORT nServerPort,
DWORD dwReserved
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER WinHttpConnect IN winhttp;
INTEGER hSession,;
STRING pswzServerName,;
INTEGER nServerPort,;
INTEGER dwReserved
|
 |
 |
 |
| Parameters: |
 |
hSession
[in] Valid HINTERNET WinHTTP session handle returned by a previous call to WinHttpOpen.
pswzServerName
[in] Pointer to a null-terminated string that contains the host name of an HTTP server.
nServerPort
[in] Unsigned integer that specifies the TCP/IP port on the server to which a connection is made.
dwReserved
[in] Reserved. Must be zero.
|
 |
 |
| Return value: |
 |
| Returns a valid connection handle to the HTTP session if the connection is successful, or NULL otherwise. |
 |
 |
| My comment: |
 |
MSDN: After the calling application has finished using the HINTERNET handle returned by WinHttpConnect, it must be closed using the WinHttpCloseHandle function.
WinHttpConnect specifies the target HTTP server, however a response can come from another server if the request was redirected. You can determine the URL of the server sending the response by calling WinHttpQueryOption with the WINHTTP_OPTION_URL flag. |
 |
 |
| Word Index links for the WinHttpConnect : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2003-04-08 12:01:50 | | Modified: | 2003-04-08 12:04:10 | Visited in last 7 days: 20 |