473,385 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

how to access to gmail

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
Expand|Select|Wrap|Line Numbers
  1. #include <stdio.h>
  2. #include <afxinet.h>
  3. #include <wininet.h>
  4. #include <conio.h>
  5. #include <string.h>
  6. #include <winsock.h>
  7. void main()
  8. {
  9.  
  10.  
  11.             int nResult=0;int result=0;
  12.             HINTERNET hInternet, hHttpSession, hHttpRequest;
  13.  
  14.          hInternet= InternetOpen("MyApp", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);
  15.          if (hInternet){
  16.  
  17.              hHttpSession=InternetConnect(hInternet, "https://www.google.com/accounts/",INTERNET_DEFAULT_HTTPS_PORT, 0, 0, INTERNET_SERVICE_HTTP, 0, 0);}
  18.  
  19.          if  (hHttpSession){
  20.              hHttpRequest =HttpOpenRequest(hHttpSession, "POST", "/ServiceLoginAuth?service=mail", 0, 0, 0,INTERNET_FLAG_SECURE, 0);}
  21.          if  (hHttpRequest){ result=HttpSendRequest(hHttpRequest, 0, 0, 0, 0); }
  22.  
  23.              printf("%d",&result);
  24.           InternetCloseHandle(hInternet);
  25.  
  26.          InternetCloseHandle(hHttpSession);
  27.          InternetCloseHandle(hHttpSession);
  28.          InternetCloseHandle(hHttpSession);
  29.  
  30. }     
  31.  
  32.  
  33.  
Nov 7 '08 #1
1 2559
arnaudk
424 256MB
Go to the gmail login page and look at the source code of the page to figure out how the login and password are submitted to the server. Then subit your own request to the server in a similar manner. It looks like the code you have just requests a webpage from the server, that's not what you need.
Nov 7 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: TheBurgerMan | last post by:
Hi all. I am using W2K3, .NET2 on a machine running AD and Exchange. I started getting the message below last week. I googled the error and not much was returned, but I did find this;...
6
by: jfbevilaqua | last post by:
Does anyone know of a utility or a method (VBA or otherwise) to be able to export ALL 100+ MS Access Queries from an Access Table into individual text files perhaps ending with .sql so they can be...
16
by: JoeW | last post by:
I'm utilizing a database that I created within MS Access within a program I've created in VB.NET. I am using the VB front end to navigate the information, but want to be able to print a report,...
17
by: IC1(SW/AW) | last post by:
I am trying to create a unique type of registration form for my job upcoming Holiday Christmas Party. There will be 60 tables for seatings with 10 people max at table. How can I write some...
26
by: codercode | last post by:
I'm working on a Visual Basic .NET using Access database. However, my client already have a 30MB database with Sybase ASA and Sybase is way too much for that. Is there anyway I can migrate from a...
8
by: Sid | last post by:
I hope someone could help me with this. I am trying to setup a criteria to decide when to allow/not allow user to click on the check box. logically it looks simple but I am not able to...
5
by: siriansoft | last post by:
I am trying to re-install access after a user deleted the folder. After entering the key the prohram verifies the install is going to the c\program files\outlook directory and that there is enough...
6
by: ET | last post by:
Dear All, I have once made a mdb file using access 2000 under Windows 2000. I didn't use it for long. Today I tried but some codes just didn't work. I am using Access 2002 and Windows XP. I have...
5
by: lgeastwood | last post by:
I have a weird problem in Access 2007. I've been working in A07 for about 2 weeks when this thing began occurring. I'm working in the VB Code Editor and set break points for event procedures....
6
by: jkmobil | last post by:
Been using Access 97 for years. I use a statistics add-on (Total Access Statistics) which is kind of expensive and I haven't found anything to be gained by upgrading. But I'm now told I probably...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.