Group: HTTP Functions (WinHTTP) - Library: winhttp
Custom HttpRequest class (WinHTTP)
BOOL WinHttpSetCredentials(
HINTERNET hRequest,
DWORD AuthTargets,
DWORD AuthScheme,
LPCWSTR pwszUserName,
LPCWSTR pwszPassword,
LPVOID pAuthParams
);
DECLARE INTEGER WinHttpSetCredentials IN winhttp;
INTEGER hRequest,;
INTEGER AuthTargets,;
INTEGER AuthScheme,;
STRING pwszUserName,;
STRING pwszPassword,;
INTEGER pAuthParams
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.
Returns TRUE if successful, or FALSE otherwise. For extended error information, call GetLastError.