Hi,
Using a sample VB6 project I found on a french web-site quite a while ago, i'd enhanced my rich VB6 environment to use the gcalendar as well as exchange.
I've just released that the version/methods I'm using is being switch off Nov 2014!!
So can anybody advise me on the syntax to switch to?
I use the following:
Function GooAuthentification(stEmail As String, stPassword As String) As Boolean
Dim stURl As String
Dim stSource As String
Dim stFormData As String
Dim stHeaders As String
stSource = App.CompanyName & "-" & App.EXEName & "-" & App.Major & "." & App.Minor
stURl = "
https://www.google.com/accounts/ClientLogin"
stFormData = "Email=" & stEmail & "&Passwd=" & stPassword & "&source=" & stSource & "&service=cl"
stHeaders = "Content-Type:application/x-www-form-urlencoded GData-Version: 2.1"
mInet.Execute stURl, "POST", stFormData, stHeaders
'Mise à 0 flag d'attente réponse
bFinAttente = False
Do Until bFinAttente = True
DoEvents
Loop
FrmDebug.txtResponse = "Authentication Response:" & _
vbCrLf & vbCrLf & _
stReponse
If InStr(1, stRetHeader, "200 OK") > 0 Then
stAuthCode = Right(stReponse, Len(stReponse) - InStrRev(stReponse, "Auth=") - 4)
GooAuthentification = True
Else
GooAuthentification = False
End If
End Function
'
' Post d'un message avec code d'identification.
'
Function GooEnvoi(stCde As String, stURl As String, Optional stFormData As String = "", Optional stETAG As String = "") As Boolean
Dim stHeaders As String
Select Case stCde
Case "DELETE", "PUT"
stHeaders = "Authorization: GoogleLogin auth=" & stAuthCode & _
"Content-Type:application/atom+xml" & vbCrLf & _
"GData-Version: 2.1" & vbCrLf & _
"If-Match: " & stETAG
Case Else
stHeaders = "Authorization: GoogleLogin auth=" & stAuthCode & _
"Content-Type:application/atom+xml" & vbCrLf & _
"GData-Version: 2.1"
End Select
bFinAttente = False
mInet.Execute stURl, stCde, stFormData, stHeaders
Do Until bFinAttente = True
DoEvents
Loop
GooEnvoi = Mid(stRetHeader, 10, 2) = "20"
End Function
Many Thanks
Martin