亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? windproc.bas

?? 運行多用戶
?? BAS
?? 第 1 頁 / 共 3 頁
字號:
Attribute VB_Name = "WindProc"
Option Explicit

Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
  (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" _
  (ByVal wndrpcPrev As Long, ByVal hWnd As Long, ByVal uMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const GWL_WNDPROC = (-4)

Public intSocket As Integer
Public OldWndProc As Long
Public IPDot As String

' Root value for hidden window caption
Public Const PROC_CAPTION = "ApartmentDemoProcessWindow"

Public Const ERR_InternalStartup = &H600
Public Const ERR_NoAutomation = &H601

Public Const ENUM_STOP = 0
Public Const ENUM_CONTINUE = 1

Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
   (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Declare Function GetWindowThreadProcessId Lib "user32" _
   (ByVal hWnd As Long, lpdwProcessId As Long) As Long

Declare Function EnumThreadWindows Lib "user32" _
   (ByVal dwThreadId As Long, ByVal lpfn As Long, ByVal lParam As Long) _
   As Long

Private mhwndVB As Long
' Window handle retrieved by EnumThreadWindows.
Private mfrmProcess As New frmProcess
' Hidden form used to id main thread.
Private mlngProcessID As Long
' Process ID.

Private Declare Function SetTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
Private Declare Function KillTimer Lib "user32" (ByVal hWnd As Long, ByVal nIDEvent As Long) As Long

Private MainApp As MainApp
Private Thread As Balk

Private mlngTimerID As Long

Sub Main()
  Dim ma As MainApp

  ' Borrow a window handle to use to obtain the process
  '   ID (see EnumThreadWndMain call-back, below).
  Call EnumThreadWindows(App.ThreadID, AddressOf EnumThreadWndMain, 0&)
  If mhwndVB = 0 Then
    Err.Raise ERR_InternalStartup + vbObjectError, , _
             "Internal error starting thread"
  Else
    GetWindowThreadProcessId mhwndVB, mlngProcessID
    ' The process ID makes the hidden window caption unique.
    If 0 = FindWindow(vbNullString, PROC_CAPTION & CStr(mlngProcessID)) Then
      ' The window wasn't found, so this is the first thread.
      If App.StartMode = vbSModeStandalone Then
        ' Create hidden form with unique caption.
        mfrmProcess.Caption = PROC_CAPTION & CStr(mlngProcessID)
        ' The Initialize event of MainApp (Instancing =
        '   PublicNotCreatable) shows the main user interface.
        Set ma = New MainApp
        ' (Application shutdown is simpler if there is no
        '   global reference to MainApp; instead, MainApp
        '   should pass Me to the main user form, so that
        '   the form keeps MainApp from terminating.)
      Else
        Err.Raise ERR_NoAutomation + vbObjectError, , _
             "Application can't be started with Automation"
      End If
    End If
  End If
End Sub

Public Sub SetThread(lThread As Balk)
  Set Thread = lThread
End Sub

' Call-back function used by EnumThreadWindows.
Public Function EnumThreadWndMain(ByVal hWnd As Long, ByVal _
                                  lParam As Long) As Long
  ' Save the window handle.
  mhwndVB = hWnd
  ' The first window is the only one required.
  ' Stop the iteration as soon as a window has been found.
  EnumThreadWndMain = ENUM_STOP
End Function

' MainApp calls this Sub in its Terminate event;
'   otherwise the hidden form will keep the
'   application from closing.
Public Sub FreeProcessWindow()
  SetWindowLong mhwndVB, GWL_WNDPROC, OldWndProc
  vbWSACleanup
  Unload mfrmProcess
  Set mfrmProcess = Nothing
End Sub

Public Sub FTP_Init(lMainApp As MainApp)
  Dim i As Integer
  Dim hdr As String, item As String
  
  '--- Initialization
  'an FTP command is terminated by Carriage_Return & Line_Feed
  'possible sintax errors in FTP commands
  sintax_error_list(0) = "200 Command Ok."
  sintax_error_list(1) = "202 Command not implemented, superfluous at this site."
  sintax_error_list(2) = "500 Sintax error, command unrecognized."
  sintax_error_list(3) = "501 Sintax error in parameters or arguments."
  sintax_error_list(4) = "502 Command not implemented."
  sintax_error_list(6) = "504 Command not implemented for that parameter."
  'initializes the list which contains the names,
  'passwords, access rights and default directory
  'recognized by the server
  If LoadProfile(App.Path & "\Burro.ini") Then
    '
  Else
    'frmFTP.StatusBar.Panels(1) = "Error Loading Ini File!"
  End If
  
  'initializes the records which contain the
  'informations on the connected users
  For i = 1 To MAX_N_USERS
    users(i).list_index = 0
 '   users(i).control_slot = INVALID_SLOT
 '   users(i).data_slot = INVALID_SLOT
    users(i).IP_Address = ""
    users(i).Port = 0
    users(i).data_representation = "A"
    users(i).data_format_ctrls = "N"
    users(i).data_structure = "F"
    users(i).data_tx_mode = "S"
    users(i).cur_dir = ""
    users(i).State = Log_In_Out '0
    users(i).full = False
  Next
 
  OldWndProc = SetWindowLong(mhwndVB, GWL_WNDPROC, AddressOf WindowProc)
  
  Set MainApp = lMainApp
 
  vbWSAStartup
  
  'begins SERVER mode on port 21
  ServerSlot = ListenForConnect(21, mhwndVB)
  
  If ServerSlot > 0 Then
   ' frmFTP.StatusBar.Panels(1) = Description
  Else
  '  frmFTP.StatusBar.Panels(1) = "Error Creating Listening Socket"
  End If
End Sub

Private Function WindowProc(ByVal hWnd As Long, ByVal uMsg As Long, _
                            ByVal wParam As Long, ByVal lParam As Long) As Long

  Dim retf As Long
  Dim SendBuffer As String, msg$
  Dim lenBuffer As Integer 'send-buffer lenght
  Dim RecvBuffer As String
  Dim BytesRead As Integer 'receive-buffer lenght
  Dim i As Integer, GoAhead As Boolean
  Dim fixstr As String * 1024
  Dim lct As String
  Dim lcv As Integer
  Dim WSAEvent As Long
  Dim WSAError As Long
  Dim Valid_Slot As Boolean
  
  Valid_Slot = False
  GoAhead = True
  
  Select Case uMsg
  Case 5150
    
    'ServerLog "NOTIFICATION - " & wParam & " - " & lParam & "> " & Format$(Date$, "dd/mm/yy ") & Format$(Time$, "hh:mm - ")
    MainApp.SvrLogToScreen "NOTIFICATION - " & wParam & " - " & lParam & "> " & Format$(Date$, "dd/mm/yy ") & Format$(Time$, "hh:mm - ")
    For i = 1 To MAX_N_USERS       'registers the slot number in the first free user record
      If wParam = users(i).control_slot And users(i).full Then
        Valid_Slot = True
        Exit For
      End If
    Next
    If (wParam = ServerSlot) Or (wParam = NewSlot) Or Valid_Slot Then 'event on server slot
   '   frmFTP.StatusBar.Panels(1) = CStr(wParam)
      WSAEvent = WSAGetSelectEvent(lParam)
      WSAError = WSAGetAsyncError(lParam)
      'Debug.Print "Retf = "; WSAEvent; WSAError
      Select Case WSAEvent
        'FD_READ    = &H1    = 1
        'FD_WRITE   = &H2    = 2
        'FD_OOB     = &H4    = 4
        'FD_ACCEPT  = &H8    = 8
        'FD_CONNECT = &H10   = 16
        'FD_CLOSE   = &H20   = 32
      Case FD_CONNECT
        Debug.Print "FD_Connect " & wParam; lParam
   '     retf = getpeername(NewSlot, SockAddr, SockAddr_Size)
   '     Debug.Print "Peername = " & retf
   '     Debug.Print "IPAddr1 =" & SockAddr.sin_addr
   '     Debug.Print "IPPort1 =" & SockAddr.sin_port
      Case FD_ACCEPT
        Debug.Print "Doing FD_Accept"

        SockAddr.sin_family = AF_INET
        SockAddr.sin_port = 0
        'SockAddr.sin_addr = 0
        NewSlot = accept(ServerSlot, SockAddr, SockAddr_Size) 'try to accept new TCP connection
        If NewSlot = INVALID_SOCKET Then
          msg$ = "Can't accept new socket."
      '    frmFTP.StatusBar.Panels(1) = msg$ & CStr(NewSlot)
 
        Else
          Debug.Print "NewSlot OK "; NewSlot; num_users; MAX_N_USERS
   '       retf = getpeername(NewSlot, SockAddr, SockAddr_Size)
          IPDot = GetAscIP(SockAddr.sin_addr)
'Had to comment out the GetHostByAddress thing cause we don't do dns
      '    frmFTP.StatusBar.Panels(1) = IPDot & "<>" '& vbGetHostByAddress(IPDot)
          'Debug.Print "Peername = " & retf
          'Debug.Print "IPAddr2 =" & SockAddr.sin_addr & " IPdot=" & IPDot
          'Debug.Print "IPPort2 =" & SockAddr.sin_port & " Port:" & ntohs(SockAddr.sin_port)
          If num_users >= MAX_N_USERS Then        'new service request
            'the number of users exceeds the maximum allowed
            SendBuffer = "421 Service not available at this time, closing control connection." & vbCrLf
            lenBuffer = Len(SendBuffer)
            retf = send(NewSlot, SendBuffer, lenBuffer, 0)
            retf = closesocket(NewSlot)           'close connection
          Else
            SendBuffer = "220-Welcome to my demo Server v0.0.1!" & vbCrLf _
                       & "220 This program is written in VB 5.0" & vbCrLf
            lenBuffer = Len(SendBuffer)
            retf = send(NewSlot, SendBuffer, lenBuffer, 0)          'send welcome message
            Debug.Print "Send = " & retf
            num_users = num_users + 1      'increases the number of connected users
            For i = 1 To MAX_N_USERS       'registers the slot number in the first free user record
              If Not users(i).full Then
                users(i).control_slot = NewSlot
                users(i).full = True
                Exit For
              End If
            Next
          End If  'If num_users
        End If  'If NewSlot
      Case FD_READ
        Debug.Print "Doing FD_Read"
        BytesRead = recv(wParam, fixstr, 1024, 0) 'store read bytes in RecvBuffer
        RecvBuffer = Left$(fixstr, BytesRead)

        If InStr(RecvBuffer, vbCrLf) > 0 Then     'if received string is a command then executes it
          For i = 1 To MAX_N_USERS                'event on control slots
            If (wParam = users(i).control_slot) Then
              retf = FTP_Cmd(i, RecvBuffer)          'tr
              Exit For
            End If
          Next
        End If
      Case FD_CLOSE
        Debug.Print "Doing FD_Close"
        For i = 1 To MAX_N_USERS  'event on control slots
          If (wParam = users(i).control_slot) Then
            retf = closesocket(wParam)        'connection closed by client
            users(i).control_slot = INVALID_SOCKET        'frees the user record
            
            Set users(i).Jenny = Nothing
            users(i).full = False
            'ServerLog "<" & Format$(i, "000") & "> " & Format$(Date$, "dd/mm/yy ") & Format$(Time$, "hh:mm") & " - Logged Off"
            MainApp.SvrLogToScreen "<" & Format$(i, "000") & "> " & Format$(Date$, "dd/mm/yy ") & Format$(Time$, "hh:mm") & " - Logged Off"
            num_users = num_users - 1
            Exit For
          ElseIf (wParam = users(i).data_slot) Then
            retf = closesocket(wParam)        'connection closed by client
            users(i).data_slot = INVALID_SOCKET   'reinitilizes data slot
            users(i).State = Service_Commands '  2
            Exit For
          End If
       Next
      Case FD_WRITE
        Debug.Print "Doing FD_Write"
        'enables sending
      End Select
    End If
    'Debug.Print GetWSAErrorString(WSAGetLastError)
    MainApp.UsrCnt num_users
  End Select
  retf = CallWindowProc(OldWndProc, hWnd, uMsg, wParam, ByVal lParam)
  WindowProc = retf
End Function

Public Function FTP_Cmd(ID_User As Integer, cmd As String) As Integer
  
  Dim Kwrd As String 'keyword
  Dim argument(5) As String 'arguments
  Dim ArgN As Long
  Dim FTP_Err As Integer 'error
  Dim PathName As String, Drv As String
  
  Dim Full_Name As String 'pathname & file name
  Dim File_Len As Long 'file lenght in bytes
  Dim i As Long
  
  Dim Ok As Integer
  Dim Buffer As String
  Dim DummyS As String
  
  'variables used during the data exchange
  Dim ExecSlot As Integer
  Dim NewSockAddr As SockAddr
  
  On Error Resume Next 'routine for error interception
  
  FTP_Err = sintax_ctrl(cmd, Kwrd, argument())
  'log commands
  'ServerLog "<" & Format$(ID_User, "000") & "> " & Format$(Date$, "dd/mm/yy ") & Format$(Time$, "hh:mm - ") & cmd
  MainApp.SvrLogToScreen "<" & Format$(ID_User, "000") & "> " & Format$(Date$, "dd/mm/yy ") & Format$(Time$, "hh:mm - ") & cmd
  If FTP_Err <> 0 Then
    retf = send_reply(sintax_error_list(FTP_Err), ID_User)
    Exit Function
  End If
  

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美体内she精高潮| 精品国产凹凸成av人网站| 国产一区二区三区久久悠悠色av | 91免费看片在线观看| 精品亚洲成av人在线观看| 亚洲在线观看免费| 国产精品人妖ts系列视频| 欧美日韩亚洲综合| 色综合一个色综合| 成人国产视频在线观看| 国产一区二区在线视频| 美国欧美日韩国产在线播放| 亚洲成人先锋电影| 亚洲一区在线电影| 亚洲女厕所小便bbb| 国产精品视频观看| 精品少妇一区二区三区免费观看| 欧美色视频一区| 色综合久久综合网| 91欧美激情一区二区三区成人| 国产成人h网站| 国产成人午夜精品5599| 日韩专区在线视频| ...中文天堂在线一区| 日韩欧美在线网站| 日韩精品一区二| 精品视频一区三区九区| 99在线热播精品免费| 丁香婷婷综合色啪| 国产一区二三区好的| 日韩电影在线免费看| 亚洲在线观看免费视频| 亚洲国产乱码最新视频| 一区二区三区四区亚洲| 亚洲一级二级三级| 亚洲成av人片在线观看无码| 亚洲精品成人精品456| 亚洲欧洲日韩女同| |精品福利一区二区三区| 亚洲精品一二三区| 亚洲色图在线视频| 亚洲一区影音先锋| 日韩—二三区免费观看av| 美女脱光内衣内裤视频久久网站| 久久精品国产一区二区| 六月婷婷色综合| 琪琪久久久久日韩精品| 国产乱子轮精品视频| 国产精品一二三四区| 丁香一区二区三区| 在线观看精品一区| 在线成人av网站| 日韩视频国产视频| 国产视频在线观看一区二区三区| 国产精品毛片久久久久久久 | 亚洲一区二区精品视频| 亚洲嫩草精品久久| 青青草国产成人av片免费| 国产成人免费高清| 91福利在线播放| 精品久久久三级丝袜| 国产精品乱人伦中文| 亚洲国产视频一区二区| 精品一区二区av| 高清成人在线观看| 欧美日韩在线不卡| 久久久精品日韩欧美| 亚洲免费资源在线播放| 奇米四色…亚洲| 成人国产亚洲欧美成人综合网| 欧美日韩精品欧美日韩精品| 欧美电视剧免费全集观看| 亚洲欧美在线另类| 理论电影国产精品| 色综合久久久网| 欧美va亚洲va香蕉在线| 亚洲欧美在线视频| 久久av中文字幕片| 国产精品综合视频| 欧美二区在线观看| √…a在线天堂一区| 免费看欧美美女黄的网站| 成人午夜在线播放| 欧美一区二区久久| 国产目拍亚洲精品99久久精品| 亚洲欧美另类综合偷拍| 久久狠狠亚洲综合| 在线观看日韩一区| 久久亚洲免费视频| 偷窥国产亚洲免费视频| 99re这里只有精品6| 欧美精品久久久久久久多人混战 | 成人激情免费电影网址| 欧美精品亚洲二区| 亚洲男人天堂一区| 国产成人欧美日韩在线电影| 制服丝袜日韩国产| 一区av在线播放| 成人免费看黄yyy456| 欧美三级资源在线| 欧美国产日韩亚洲一区| 看片的网站亚洲| 欧美日韩不卡在线| 夜夜精品浪潮av一区二区三区| 国产一区二区精品久久| 欧美大片日本大片免费观看| 亚洲男帅同性gay1069| 成人天堂资源www在线| 亚洲精品在线免费播放| 另类小说综合欧美亚洲| 欧美日韩精品一区视频| 中文字幕中文字幕在线一区 | 懂色av一区二区三区蜜臀| 欧美r级电影在线观看| 全国精品久久少妇| 91在线观看免费视频| 亚洲国产成人私人影院tom| 国产毛片精品一区| 久久你懂得1024| 国产自产v一区二区三区c| 亚洲高清不卡在线| 成人一区二区三区| 91麻豆成人久久精品二区三区| 国产婷婷一区二区| 国产寡妇亲子伦一区二区| 26uuu亚洲| 国产一区二区调教| 5858s免费视频成人| 婷婷中文字幕一区三区| 欧美日韩精品一区二区三区| 一区二区三区在线视频免费| 亚洲成a天堂v人片| 亚洲女女做受ⅹxx高潮| 国产精品久久久久久久久免费桃花| 国产在线视频精品一区| 日韩一区欧美二区| 91精品婷婷国产综合久久性色| 亚洲成人免费影院| 欧美精品色综合| 看电视剧不卡顿的网站| 欧美高清视频在线高清观看mv色露露十八 | 日本国产一区二区| 一区二区三区成人在线视频| 欧美午夜精品一区二区三区| 亚洲超碰精品一区二区| 91精品国产乱码久久蜜臀| 免费在线成人网| 久久久久成人黄色影片| www.日韩大片| 亚洲尤物视频在线| 在线观看成人小视频| 亚洲一线二线三线视频| 欧美理论电影在线| 日韩高清一区二区| 91原创在线视频| 午夜精品视频一区| 欧美一级黄色片| 午夜免费久久看| 日韩三区在线观看| 国产成人在线视频网站| 综合色天天鬼久久鬼色| 欧美色精品在线视频| 日韩黄色免费网站| 日韩欧美专区在线| 成人黄色电影在线| 视频一区在线播放| 国产亚洲综合av| 99r精品视频| 青青草一区二区三区| 国产精品美女久久久久高潮| 欧美日韩成人在线| 国产a精品视频| 亚洲色图.com| 欧美体内she精高潮| 青青草91视频| 精品电影一区二区| 成人黄色电影在线 | 成人av电影在线播放| 成人午夜精品一区二区三区| 亚洲一区免费观看| 国产亚洲1区2区3区| 欧美日韩一区二区三区在线| 久久99精品国产.久久久久| 136国产福利精品导航| 欧美成人精精品一区二区频| 91视频免费播放| 看片网站欧美日韩| 一区二区三区蜜桃网| 欧美一级精品在线| 国产一区 二区 三区一级| 亚洲成人精品影院| 中文字幕亚洲一区二区av在线 | 波多野结衣一区二区三区| 秋霞电影一区二区| 国产精品福利电影一区二区三区四区| 欧美巨大另类极品videosbest | 亚洲一区二区精品久久av| 欧美成人一级视频| 在线日韩av片| thepron国产精品|