You should check 2 plages:
1.
Google Drive API[
^]
2.
Libcurl API[
^]
You can also learn the basics of communicating with this (and other) API's using REST, so you can choose other wrapper libraries or write your own.
Many things has changed since
my article was written[
^] , but the principle is the same. You use Google's API to log in.
You first connect to the server:
BOOL Connect(LPCTSTR szServerName, INTERNET_PORT nServerPort = INTERNET_DEFAULT_HTTP_PORT);
You "Connect" function should be something like:
BOOL CSmartHTTP::Connect(LPCTSTR serverName, INTERNET_PORT serverPort)
{
Disconnect();
if (Initialize())
{
m_hConnection = InternetConnect(m_hInet, serverName, serverPort,
NULL, NULL, INTERNET_SERVICE_HTTP, 0, (DWORD_PTR) this);
}
return (CheckResult(m_hConnection != NULL));
}
Then, without writing the entire code for you, you send request and check the response.
if (SendRequest(res, rs.GetHandle(), header, content, contentLength))
{
len = sizeof(httpStatus);
if (!CheckResult(HttpQueryInfo(rs.GetHandle(), HTTP_QUERY_STATUS_CODE | HTTP_QUERY_FLAG_NUMBER,
&httpStatus, &len, NULL)))
{
res = RES_EWININET;
}
else
{
result = ReadReplyEx(res, httpStatus, readCallback, userParam, rs.GetHandle());
}