Thanks Seth. That would be great. I would love to see how you
rewrote the INET control for your project. What is the best way to
get the code? Post it to the board or email it to me directly? let
me know Seth. Thanks again for your comments.
Pete
--- In visualbasic6programming%40yahoogroups.com">visualbasic6programmingyahoogroups.com, DNPhoenix
<dnphoenix...> wrote:
>
> Bad news Pete,
>
> I too ran into this issue, but only with HTTPS/SSL
> and subsequently found thet the INET control does not
> support sFTP/HTTPS, especially if the SSL is using a
> self-signed certificate. To conquour this issue, I
> ended up rewriting the INET control to allow secure
> connections. I can provide you with the code for the
> control, but cannot guatantee the sFTP, since my goal
> at the time was only HTTPS issues. >
> Seth
>
> --- Pete Arant <petemesa...> wrote:
>
> > I have been doing a bunch of research on the INET
> > control offered by
> > VB6. Specifically, does the control offer/support
> > sFTP (secure FTP)
> > transmissions. Bottom line, I have a windows form
> > based application
> > (fat client) that is currently modem transferring
> > .txt files to a
> > location. I need to offer a secure FTP of the same
> > .txt files to a
> > location that will accept sFTP transmissions. Anyone
> > have any
> > information or experience with this issue. Thanks. > >
> > Pete
> >
> >
>
>
> Seth Alexander
> Phoenix 'Xypher' Systems > http://wave.prohosting.com/dnphoeni/
> dnphoenix...
>
>
>
>
__________________________________________________________
_______________
> Be a better Globetrotter. Get better travel answers from someone
who knows. Yahoo! Answers - Check it out.
> http://answers.yahoo.com/dir/?link=list&sid=396545469 >
First off this code must sit on a 'User Control' named
WinInet with 2 shapes (circles), shape1 and shape2. These shapes act like a blinking red/green status
indicator of network activity if you make the control visible. Other than that, all you have to do is copy
and paste the code below to the control's code window. Hope it helps!
Seth
' *#*#*#*#*#*#*#*#*#*# Basic process variables Below
*#*#*#*#*#*#*#*#*#*#*#*#*
Option Explicit
Event StateChanged(ByVal State As Integer)
Private hInternetSession As Long
Private hInternetConnect As Long
Private hHttpOpenRequest As Long
Private mAccessType As AccessConstants
Private mDocument As String
Private mHeader As String
Private mhInternet As Long
Private mProtocol As ProtocolConstants
Private mProxy As String
Private mPassword As String
Private mRemoteHost As String
Private mRemotePort As Integer Private mRequestTimeout As Long
Private mSecure As Boolean Private mStillExecuting As Boolean Private mURL As String
Private mUsername As String
Private SecFlags As Long
Private Service As Long
'Windows Sockets constants
Private Const IP_SUCCESS As Long = 0
Private Const MAX_WSADescription As Long = 256
Private Const MAX_WSASYSStatus As Long = 128
Private Const WS_VERSION_REQD As Long = &H101
'Private Const WS_VERSION_MAJOR As Long =
WS_VERSION_REQD &H100 And &HFF&
'Private Const WS_VERSION_MINOR As Long =
WS_VERSION_REQD And &HFF&
'Private Const MIN_SOCKETS_REQD As Long = 1
'Private Const SOCKET_ERROR As Long = -1
'Private Const ERROR_SUCCESS As Long = 0
Private Type WSADATA wVersion As Integer wHighVersion As Integer szDescription(0 To MAX_WSADescription) As Byte
szSystemStatus(0 To MAX_WSASYSStatus) As Byte
wMaxSockets As Long
wMaxUDPDG As Long
dwVendorInfo As Long
End Type
' User agent constant.
Private Const scUserAgent = "PXS"
' Internet access settings.
Private Const INTERNET_OPEN_TYPE_DIRECT As Long = 1
Private Const INTERNET_OPEN_TYPE_PRECONFIG As Long = 0
Private Const
INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY As Long
= 4
Private Const INTERNET_OPEN_TYPE_PROXY As Long = 3
Public Enum AccessConstants
icRegistry = INTERNET_OPEN_TYPE_PRECONFIG icDirect = INTERNET_OPEN_TYPE_DIRECT
icProxy = INTERNET_OPEN_TYPE_PROXY
icDefaultNoProxy =
INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY
End Enum
Public Enum DataTypeConstants
icString
icByteArray
End Enum
Public Enum Operations
icGet
icHead
icPost
icPut
End Enum
' Number of the TCP/IP port on the server to connect to.
Private Const INTERNET_DEFAULT_FTP_PORT = 21
Private Const INTERNET_DEFAULT_GOPHER_PORT = 70
Private Const INTERNET_DEFAULT_HTTP_PORT = 80
Private Const INTERNET_DEFAULT_HTTPS_PORT = 443
Private Const INTERNET_DEFAULT_SOCKS_PORT = 1080
Private Const INTERNET_INVALID_PORT_NUMBER = 0
Private Const INTERNET_OPTION_CONNECT_TIMEOUT = 2
Private Const INTERNET_OPTION_RECEIVE_TIMEOUT = 6
Private Const INTERNET_OPTION_SEND_TIMEOUT = 5
Private Const INTERNET_OPTION_USERNAME = 28
Private Const INTERNET_OPTION_PASSWORD = 29
Private Const INTERNET_OPTION_PROXY_USERNAME = 43
Private Const INTERNET_OPTION_PROXY_PASSWORD = 44
' Type of service to access. Private Const INTERNET_SERVICE_FTP = 1
Private Const INTERNET_SERVICE_GOPHER = 2
Private Const INTERNET_SERVICE_HTTP = 3
' Protocol Constants Declaration
Public Enum ProtocolConstants
icUnknown
icDefault
icFTP
icGopher
icHTTP
icHTTPS icSocks End Enum
' Brings the data across the wire even if it locally cached.
Private Const INTERNET_FLAG_RELOAD = &H80000000
Private Const INTERNET_FLAG_KEEP_CONNECTION = &H4000