Using Win32 functions in Visual FoxPro Image Gallery
HTTP Functions (WinHTTP)
WinHttpAddRequestHeaders
WinHttpCloseHandle
WinHttpConnect
WinHttpCrackUrl
WinHttpOpen
WinHttpOpenRequest
WinHttpQueryDataAvailable
WinHttpQueryHeaders
WinHttpReadData
WinHttpReceiveResponse
WinHttpSendRequest
WinHttpSetCredentials
Code examples:
Custom HttpRequest class (WinHTTP)
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:
Custom HttpRequest class (WinHTTP)
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:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2003-04-08 12:01:50
Modified: 2003-04-08 12:04:10
Visited in last 7 days: 11
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.35), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.158.188.59)
36 sec.Function: 'RegEnumValue'
1.37 min.Function: 'StrToIntEx'
1.47 min.Function: 'recv'
Google
Advertise here!