Erdenemandal
Well-known member
HI AL
I am using VB.NET . But my script does not fit into VB.NET
I want to uplado file to server,
This is my CODE
Thanks,
Erdenemandal
I am using VB.NET . But my script does not fit into VB.NET
I want to uplado file to server,
This is my CODE
Thanks,
Erdenemandal
Code:
Private Declare Function InternetOpen Lib "wininet" Alias "InternetOpenA" ( _
ByVal lpszAgent As String, _
ByVal dwAccessType As Long, _
ByVal lpszProxyName As String, _
ByVal lpszProxyBypass As String, _
ByVal dwFlags As Long) _
As Long
Private Declare Function InternetConnect Lib "wininet" Alias "InternetConnectA" ( _
ByVal hInternet As Long, _
ByVal lpszServerName As String, _
ByVal nServerPort As Long, _
ByVal lpszUserName As String, _
ByVal lpszPassword As String, _
ByVal dwService As Long, _
ByVal dwFlags As Long, _
ByVal dwContext As Long) _
As Long
Private Declare Function FtpPutFile Lib "wininet.dll" Alias "FtpPutFileA" (ByVal hConnect As Long, ByVal lpszLocalFile As String, ByVal lpszNewRemoteFile As String, ByVal dwFlags As Long, ByVal dwContext As Long) As Boolean
Me.mOPenHandler = InternetOpen("Curavis", Me.INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)
Me.hConnectedHandle = InternetConnect(mOPenHandler, "192.168.0.96", 21, userName, userPAss, 1, 0, 0)
If FtpPutFile(Me.hConnectedHandle, "C:\dirmap.txt", "/home/erdene/tssest.htm", &H0, 0) Then
MsgBox("OK")
Else
MsgBox("ONONO")
MsgBox(GetLastError.ToString)
End If