View Single Post
  #1 (permalink)  
Old February 16th, 2008, 02:45 PM
deco deco is offline
Registered User
Join Date: Apr 2007
Location: , , Libya.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to deco
Default Send URL request to send sms via NowSMS

I use this code to send SMS via NowSMS Software its work in vb6 but in vb2005 doesn't work
Public Declare Function InternetOpen Lib "wininet.dll" Alias "InternetOpenA" (ByVal sAgent As String, ByVal lAccessType As Long, ByVal sProxyName As String, ByVal sProxyBypass As String, ByVal lFlags As Long) As Long
Public Declare Function InternetOpenUrl Lib "wininet.dll" Alias "InternetOpenUrlA" (ByVal hInternetSession As Long, ByVal sURL As String, ByVal sHeaders As String, ByVal lHeadersLength As Long, ByVal lFlags As Long, ByVal lContext As Long) As Long
Public Declare Function InternetCloseHandle Lib "wininet.dll" (ByVal hInet As Long) As Integer

Public Const IF_NO_CACHE_WRITE = &H4000000

Dim hInternet As Long, hSession As Long, iResult As Long
Dim urlStr as String

urlStr = ""
hSession = InternetOpen("vb wininet", 1, vbNullString, vbNullString, 0)

If hSession Then 

hInternet = InternetOpenUrl(hSession, UrlStr, vbNullString, 0, IF_NO_CACHE_WRITE, 0)

iResult = InternetCloseHandle(hInternet)

End If