i write code in c ,i only need to access to gmail using username and password
i didn't know where i can write username and password in this code
i didn't know where i can write username and password in this code
Code:
#include <stdio.h> #include <afxinet.h> #include <wininet.h> #include <conio.h> #include <string.h> #include <winsock.h> void main() { int nResult=0;int result=0; HINTERNET hInternet, hHttpSession, hHttpRequest; hInternet= InternetOpen("MyApp", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0); if (hInternet){ hHttpSession=InternetConnect(hInternet, "https://www.google.com/accounts/",INTERNET_DEFAULT_HTTPS_PORT, 0, 0, INTERNET_SERVICE_HTTP, 0, 0);} if (hHttpSession){ hHttpRequest =HttpOpenRequest(hHttpSession, "POST", "/ServiceLoginAuth?service=mail", 0, 0, 0,INTERNET_FLAG_SECURE, 0);} if (hHttpRequest){ result=HttpSendRequest(hHttpRequest, 0, 0, 0, 0); } printf("%d",&result); InternetCloseHandle(hInternet); InternetCloseHandle(hHttpSession); InternetCloseHandle(hHttpSession); InternetCloseHandle(hHttpSession); }
Comment