Skip to content

Latest commit

 

History

History
67 lines (48 loc) · 1.51 KB

WinHttpSetCredentials.md

File metadata and controls

67 lines (48 loc) · 1.51 KB

Home

Function name : WinHttpSetCredentials

Group: HTTP Functions (WinHTTP) - Library: winhttp


The WinHttpSetCredentials function passes the required authorization credentials to the server.


Code examples:

Custom HttpRequest class (WinHTTP)

Declaration:

BOOL WinHttpSetCredentials(
  HINTERNET hRequest,
  DWORD AuthTargets,
  DWORD AuthScheme,
  LPCWSTR pwszUserName,
  LPCWSTR pwszPassword,
  LPVOID pAuthParams
);  

FoxPro declaration:

DECLARE INTEGER WinHttpSetCredentials IN winhttp;
	INTEGER hRequest,;
	INTEGER AuthTargets,;
	INTEGER AuthScheme,;
	STRING  pwszUserName,;
	STRING  pwszPassword,;
	INTEGER pAuthParams
  

Parameters:

hRequest [in] Valid HINTERNET handle returned by WinHttpOpenRequest.

AuthTargets [in] An unsigned integer that specifies a flag that contains the authentication target.

AuthScheme [in] An unsigned integer that specifies a flag that contains the authentication scheme.

pwszUserName [in] Pointer to a string that contains a valid user name.

pwszPassword [in] Pointer to a string that contains a valid password. The password can be blank.

pAuthParams [in] Reserved. Must be NULL.


Return value:

Returns TRUE if successful, or FALSE otherwise. For extended error information, call GetLastError.