• Welcome to Valhalla Legends Archive.
 

VB 5.0, need help with msinet.ocx ftp

Started by Tontow, December 15, 2003, 11:09 PM

Previous topic - Next topic

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, "[email protected]", "mypassword", 1, 0, 0)
MsgBox (lngINetConn)
blnRC = FtpPutFile(lngINetConn, "c:\index.html", "index.html", 2, 0)
MsgBox (blnRC)
InternetCloseHandle lngINetConn
InternetCloseHandle lngINet
End Sub

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 ;)
To restrict ones ability to learn based on current surroundings means to never learn anything at all. - DarkVirus

Skywing

#2
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.

Tontow

Quote from: DarkVirus on December 16, 2003, 09:09 AM
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 ;)
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 from: Skywing on December 16, 2003, 10:43 AM
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.
ok, but it still isnt working....
frist textbox says 13369348
second textbox says 0
third one says false

DarkVirus

Quote from: Tontow on December 16, 2003, 11:26 AM

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

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)
To restrict ones ability to learn based on current surroundings means to never learn anything at all. - DarkVirus

Tontow

well as far as the msinet.ocx is concerned im tonto-founded

Lobo

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.
Look it's a signature.

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????

Crypticflare

Registering the control or your visual basic compiler.. I'm assuming your using some type of free-trial one?

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.

Tontow

#10
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???

Tontow

i found why it wouldnt let me do it
QuoteVbc.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".

but it still didnt solve my problem with the ftp code