⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fce4vb_r.txt

📁 建设银行设备台帐管理程序 固定资产管理 VB数据库编程
💻 TXT
📖 第 1 页 / 共 3 页
字号:
       EXAMPLE

               Dim Buffer As String * 50


               ' display registration string within the DLL
               Code = fceGetString(0,FCE_GET_REGISTRATION,Buffer,50)
               PRINT "Registration = " + Left$(Buffer, Code)

               ' display server IP address in dotted format.
               Code = fceGetString(0,FCE_GET_SERVER_IP,Buffer,20)
               PRINT "Server IP address = " + Left$(Buffer, Code)

      ALSO SEE fceGetInteger























     FCE4VB Reference Manual                                    Page 18

      +------------+------------------------------------------------------+
      | fcePutFile | Uploads file to FTP server.                          |
      +------------+------------------------------------------------------+


        SYNTAX  Declare Function fcePutFile(
                    ByVal Chan As Long,       ' channel number
                    ByVal FileName As String) ' name of file to upload

       REMARKS  The fcePutFile function uploads the file 'FileName' to the
                FTP server.

                The file 'FileName' to be uploaded must be in the local
                upload/download directory.

       RETURNS  < 0 : An error has occurred. Call fceErrorText.

       EXAMPLE

                ' Attach FCE
                Code = fceAttach(1, FCE_KEY_CODE)
                If Code < 0 Then
                  PRINT "Cannot attach FCE"
                  Exit Function
                End If
                ' Connect to FTP server
                Code =
                fceConnect(0,"ftp.hiwaay.net","ftp","you@isp.com")
                If Code < 0 Then
                  Call DisplayError(Code)
                  Exit Function
                End If
                ' upload file
                Code = fcePutFile(0,"COMMENTS.TXT")
                If Code >= 0 Then
                  PRINT "File uploaded"
                End If
                ' close connection.
                Code  = fceClose(0)
                ' release FCE
                Code = fceRelease()

      ALSO SEE fceGetFile.















     FCE4VB Reference Manual                                    Page 19

      +------------+------------------------------------------------------+
      | fceRelease | Releases FCE.                                        |
      +------------+------------------------------------------------------+


        SYNTAX  Declare Function fceRelease()

       REMARKS  The fceRelease function releases the FCE system. This
                should be the very last function called.

                fceClose should be called for all channels before calling
                fceRelease.

       RETURNS  < 0 : An error has occurred. Call fceErrorText.

       EXAMPLE

                ' Initialize FCE
                Code = fceAttach(1, FCE_KEY_CODE)

                ' call FCE functions except fceAttach and fceRelease.

                ' Terminate FCE
                Code = fceRelease()

      ALSO SEE fceAttach.
































     FCE4VB Reference Manual                                    Page 20

      +---------------+---------------------------------------------------+
      | fceSetInteger | Sets numeric parameter.                           |
      +---------------+---------------------------------------------------+


        SYNTAX  Declare Function fceSetInteger(
                    ByVal Chan As Long,        ' channel number
                    ByVal ParamName As Long,   ' parameter name
                    ByVal ParamValue As Long)  ' parameter value

       REMARKS  The fceSetInteger function sets the numeric parameter
                'ParamName' to the value 'ParamValue'.

                        Parameter Name      Default

                FCE_SET_MIN_RESPONSE_WAIT : 0
                FCE_SET_MAX_RESPONSE_WAIT : 10000
                     FCE_SET_CONNECT_WAIT : 60000
                    FCE_SET_MIN_LINE_WAIT : 0
                    FCE_SET_MAX_LINE_WAIT : 20000
                 FCE_SET_AUTO_CALL_DRIVER : 1
                       FCE_SET_SLEEP_TIME : 20 (WIN32 only)
                         FCE_SET_FTP_PORT : 21
                     FCE_SET_CLOSE_LINGER : 50 (WIN32) or 500 (WIN16)
                    FCE_SET_WRITE_BUFSIZE : 512 (WIN16) or 1024 (WIN32)
                          FCE_SET_PASSIVE : 0

                FCE_SET_MIN_RESPONSE_WAIT is the delay before looking for
                the server's response.

                FCE_SET_MAX_RESPONSE_WAIT is the time after which a
                "time-out" error occurs if the server has not responded.

                FCE_SET_MIN_LINE_WAIT is the delay before checking if the
                server is ready to accept the next line of input.

                FCE_SET_MAX_LINE_WAIT is the time after which a "time-out"
                error is declared if the server has not responded.

                FCE_SET_CONNECT_WAIT is the maximum time allowed to
                complete a connection to the SMTP server.

















     FCE4VB Reference Manual                                    Page 21

                FCE_SET_SLEEP_TIME is the sleep time (in milliseconds) when
                waiting for socket I/O to complete. Usefull in
                multi-threaded environments.

                FCE_SET_FTP_PORT is the port number to use when connecting
                to the FTP server. The default is the well-known port
                number 21.

                FCE_SET_CLOSE_LINGER is the "linger" time after an upload
                is completed before closing the data socket. Setting this
                value too small (at least in WIN16) causes the data socket
                to be closed before the last block of data is transmitted.

                FCE_SET_WRITE_BUFSIZE is the transmit block size. The
                maximum value is 4096 for WIN16 and 8192 for WIN32.

                FCE_SET_PASSIVE sets passive mode on (1) and off (0).

       RETURNS  < 0 : An error has occurred. Call fceErrorText.

       EXAMPLE

                ' disable the automatic calling of the state driver.
                Code = fceSetInteger(0, FCE_SET_AUTO_CALL_DRIVER, 0)

                ' set the write buffer size to 2048.
                Code = fceSetInteger(0, FCE_SET_WRITE_BUFSIZE, 2048)

                ' set the WIN32 sleep time to 100 mS.
                Code = fceSetInteger(0, FCE_SET_SLEEP_TIME, 100)

      ALSO SEE fceSetString


























     FCE4VB Reference Manual                                    Page 22

      +----------------+--------------------------------------------------+
      | fceSetLocalDir | Sets the local upload/download directory.        |
      +----------------+--------------------------------------------------+


        SYNTAX  Declare Function fceSetLocalDir(
                    ByVal Chan As Long,        ' channel number
                    ByVal DirName As String)   ' local directory path

       REMARKS  The fceSetLocalDir function sets the local computer upload
                and download directories. The upload and download
                directory is the directory used by FCE for all uploads and
                downloads.

       RETURNS  < 0 : An error has occurred. Call fceErrorText.

       EXAMPLE

                ' specify the local upload/download directory.

                Code = fceSetLocalDir(0, "C:\TEMP")

                ' all upload and download requests will now use directory
                ' C:\TEMP.

      ALSO SEE fceGetLocalDir
































     FCE4VB Reference Manual                                    Page 23

      +------------+------------------------------------------------------+
      | fceSetMode | Sets FTP transfer mode.                              |
      +------------+------------------------------------------------------+


        SYNTAX  Declare Function fceSetMode(
                    ByVal Chan As Long,   ' channel number
                    ByVal Mode As Long)   ' transfer mode ('A' or 'B')

       REMARKS  The fceSetMode function sets the FTP transfer mode. Pass
                ASC("A") to specify ASCII mode and ASC("B") to specify
                binary mode.

                Since the FTP default is usually ASCII, it is good practice
                to always specify the transfer mode before the first call
                to fceGetFile or fcePutFile.

                If unsure of the transfer mode, choose binary.

       RETURNS  < 0 : An error has occurred. Call fceErrorText.

       EXAMPLE

                ' set ASCII mode
                Code = fceSetMode(0, ASC("A"))

                ' set binary mode
                Code = fceSetMode(0, ASC("B"))

      ALSO SEE fceGetFile and fcePutFile.




























     FCE4VB Reference Manual                                    Page 24

      +-----------------+-------------------------------------------------+
      | fceSetServerDir | Sets the FTP directory.                         |
      +-----------------+-------------------------------------------------+


        SYNTAX  Declare Function fceSetServerDir(
                    ByVal Chan As Long,        ' channel number
                    ByVal DirName As String)   ' directory name

       REMARKS  The fceSetServerDir sets the FTP directory to 'DirName'
                which is used for subsequent FCE calls.

                Note that UNIX FTP servers use forward slashes for
                directories while Windows FTP servers use backward
                slashes.


       RETURNS  < 0 : An error has occurred. Call fceErrorText.

       EXAMPLE

               'set server directory to "pub/other"
               Code = fceSetServer(0, "pub/other")
               If Code < 0 Then
                 '...handle error...
               End If
               ' server directory requested is accepted

      ALSO SEE





























     FCE4VB Reference Manual                                    Page 25

      +--------------+----------------------------------------------------+
      | fceSetString | Sets string parameter.                             |
      +--------------+----------------------------------------------------+


        SYNTAX  Declare Function fceSetString(
                    ByVal Chan As Long,        ' channel number
                    ByVal ParamName As Long,   ' parameter name
                    ByVal ParamPtr As String)  ' parameter string

       REMARKS  The fceSetString function sets the string parameter
                'ParamName' to 'ParamPtr'.

                FCE_SET_LOG_FILE is used to specify the log file name. Log
                files can be quite large, so use only when necessary.

                FCE_WRITE_TO_LOG is used to write a string (message) to
                log file.

       RETURNS  < 0 : An error has occurred. Call fceErrorText.

       EXAMPLE

               ' open LOG file
               Code = fceSetString(0, FCE_SET_LOG_FILE, "program.log")

               ' write "hello" to LOG file.
               Code = fceSetString(0, FCE_WRITE_TO_LOG, "Hello")

      ALSO SEE fceSetInteger




























     FCE4VB Reference Manual                                    Page 26

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -