1)在Visual Basic生成标准的EXE文件。缺省创建 Form1。 2)在Form1中添加一命令按钮,缺省名为Command1。 3)把下列代码放到Form1中说明部分。 Option Explicit Private Const NCBASTAT = &H33 Private Const NCBNAMSZ = 16 Private Const HEAP_ZERO_MEMORY = &H8 Private Const HEAP_GENERATE_EXCEPTIONS = &H4 Private Const NCBRESET = &H32 Private Type NCB ncb_command As Byte ´Integer ncb_retcode As Byte ´Integer ncb_lsn As Byte ´Integer ncb_num As Byte ´ Integer ncb_buffer As Long ´String ncb_length As Integer ncb_callname As String * NCBNAMSZ ncb_name As String * NCBNAMSZ ncb_rto As Byte ´Integer ncb_sto As Byte ´ Integer ncb_post As Long ncb_lana_num As Byte ´Integer ncb_cmd_cplt As Byte ´Integer ncb_reserve(9) As Byte ´ Reserved, must be 0 ncb_event As Long End Type
|