Valhalla Legends Forums Archive | Visual Basic Programming | VB 5.0, need help with msinet.ocx ftp

AuthorMessageTime
Tontow
im trying to upload a single html file useing the msinet
the InternetOpen suceeds but the InternetConnect fails and thus the putfile fails
if im doing something wrong, please tell me, Help

my current code:
[quote]
Private Declare Function InternetOpen Lib "c:\windows\system\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

Private Declare Function InternetConnect Lib "c:\windows\system\wininet.dll" Alias "InternetConnectA" _
(ByVal hInternetSession As Long, ByVal sServerName As String, _
ByVal nServerPort As Integer, ByVal sUsername As String, _
ByVal sPassword As String, ByVal lService As Long, _
ByVal lFlags As Long, ByVal lContext As Long) As Long

Private Declare Function FtpPutFile Lib "c:\windows\system\wininet.dll" Alias "FtpPutFileA" _
(ByVal hFtpSession As Long, ByVal lpszLocalFile As String, _
ByVal lpszRemoteFile As String, ByVal dwFlags As Long, _
ByVal dwContext As Long) As Boolean

Private Declare Function InternetCloseHandle Lib "c:\windows\system\wininet.dll" (ByVal hInet As Long) As Integer
Dim lngINet As Long


Private Sub Command1_Click()
lngINet = InternetOpen("Form1", 0, vbNullString, vbNullString, 0)
MsgBox (lngINet)
lngINetConn = InternetConnect(lngINet, "ftp.killerpro.com/", 21, "merlin@killerpro.com", "mypassword", 1, 0, 0)
MsgBox (lngINetConn)
blnRC = FtpPutFile(lngINetConn, "c:\index.html", "index.html", 2, 0)
MsgBox (blnRC)
InternetCloseHandle lngINetConn
InternetCloseHandle lngINet
End Sub
[/quote]
December 16, 2003, 5:09 AM
DarkVirus
Assuming yur trying to represent your name as the spanish equivalent of "dumb", it should be spelled "tonto", not "tontow".

Just figured I'd point that out if this was the case ;)
December 16, 2003, 3:09 PM
Skywing
Don't specify absolute library paths. That's extremely bad practice if you expect your program to be the least bit compatible with other computers.
December 16, 2003, 4:43 PM
Tontow
[quote author=DarkVirus link=board=31;threadid=4273;start=0#msg35715 date=1071587369]
Assuming yur trying to represent your name as the spanish equivalent of "dumb", it should be spelled "tonto", not "tontow".

Just figured I'd point that out if this was the case ;)
[/quote]
and tonton is what the little french boys call boobs ;D

Hasnt anyone ever heard of "The Lone Ranger" raido show, thay also made a movie not too long ago, anyway tontow was the lone ranger's sidekick, lone ranger was alread in use by more than one person on the web so i chose tontow as my common net handle a long time ago

[quote author=Skywing link=board=31;threadid=4273;start=0#msg35734 date=1071593024]
Don't specify absolute library paths. That's extremely bad practice if you expect your program to be the least bit compatible with other computers.
[/quote]
ok, but it still isnt working....
frist textbox says 13369348
second textbox says 0
third one says false
December 16, 2003, 5:26 PM
DarkVirus
[quote author=Tontow link=board=31;threadid=4273;start=0#msg35740 date=1071595594]

and tonton is what the little french boys call boobs ;D

Hasnt anyone ever heard of "The Lone Ranger" raido show, thay also made a movie not too long ago, anyway tontow was the lone ranger's sidekick, lone ranger was alread in use by more than one person on the web so i chose tontow as my common net handle a long time ago
[/quote]

Right, but "Tonto" was the way the lone rangers sidekick's name was spelled. He called him "Tonto" because he was "dumb".

Que quiere decier "tonto" en ingles?
"dumb"

8)
December 16, 2003, 8:51 PM
Tontow
well as far as the msinet.ocx is concerned im tonto-founded
December 17, 2003, 2:36 AM
Lobo.id
Couldn't you just use the Inet Control for this, im not sure if it supports FTP. There's really smart people around here that can tell you that better then me.
December 17, 2003, 7:31 PM
Tontow
THATS WHAT THE MSINET.OCX IS :o :-X >:( :-\ :-X :'( .....................

i was just going under Project-References befor.

I just tryed adding it by/as a componit (ctrl-c), and when i went to add it to the form a error mssage box pops up
"License information for this componet not found. You do not have an appropriate licens to use this functionality in the design enviroment"

any way to get around this????
December 17, 2003, 8:46 PM
Crypticflare
Registering the control or your visual basic compiler.. I'm assuming your using some type of free-trial one?
December 18, 2003, 9:41 PM
hismajesty
Use Winsock, I had this same problem the other day and it was fixed when I switched it to Winsock. Besides, I've heard that INet isn't as reliable as winsock for this. In fact, I've noticed that INet tends to freeze up upon disconnecting from the FTP.
December 18, 2003, 9:56 PM
Tontow
when it wasnt working, i replaced the wininet.ocx file in my system folder (thinking that it was bust) with one i dled from some websit.....
and iv no clue on how to use winstock, dose it support ftp??? and how would u/whats the code to up load a single file every time a buttion is clicked???
December 19, 2003, 1:58 AM
Tontow
i found why it wouldnt let me do it
[quote] Vbc.exe installs the Vbcmpfix.exe utility, that fixes problems identified by the following symptons: (1) When trying to site a control within your project you receive the error message "License Information For This Component Not Found. You Do Not Have An Appropriate License To Use This Functionality In The Design Environment;" (2) When trying to compile your project you receive the following error: "Compile Error : Permission Denied;" and (3) When trying to run your project you receive the following error: "Runtime Error '429' : ActiveX Component Can't Create Object". [/quote]

but it still didnt solve my problem with the ftp code
December 19, 2003, 4:01 PM

Search