プロが教えるわが家の防犯対策術!

Internet Transfer ontrol を使用して、FTP ノテストプログラムを作成中です。環境は、Windows XP、VB6.0 SP5 です。FTP の接続先はラズベリーパイです。

以下にソースプログラムを書きます。

Option Explicit

Private Sub CCmd_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
CGo_Click
End If
End Sub

Private Sub CGo_Click()
With Inet1
.URL = "XXX.XXX.XXX.XXX"
.UserName = "XX"
.Password = "XXXXX"
.Execute , "DIR"
End With

TDATA.Text = ""
' Inet.Execute TURL.Text, CCmd.Text
End Sub

Private Sub Inet1_StateChanged(ByVal State As Integer)
Dim vtData As Variant ' データを入れる変数。
Dim strData As String: strData = ""
Dim bDone As Boolean

' icResponseCompletedの場合,GetChunk メソッドを
' 使用してサーバーの応答を取得する,他の場合は無視.
Select Case State '
Case icResponseCompleted
' 最初のチャンクを取得
vtData = Inet1.GetChunk(1024, icString)
DoEvents

bDone = False
Do While Not bDone
DoEvents
strData = strData & vtData
DoEvents
' 次のチャンクを取得します。
vtData = Inet1.GetChunk(1024, icString)
If Len(vtData) = 0 Then
bDone = True
End If
Loop

' 表示
TDATA.Text = strData
End Select
End Sub

このプログラムを実行すると 「実行時エラー 36754 リモートホストに接続出来ません。」が出てしまいます。どなたか、対策をお教え下さい。宜しくお願い致します。

A 回答 (1件)

URLの記載が間違っている可能性が高そうですね。



あとはラズベリーパイでFTPサーバーが動いていないとか。
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!