• 当前位置:首页>>VC语言>>VC基础教程>>纯PB代码实现串口通讯控件的源程序
  • 纯PB代码实现串口通讯控件的源程序
  • 作者:天遥 blazingstar@sina.com
    下载: pbcomm.zip (size:21kb) pb 6.x

    图片:

    程序中定义的API:
    Function Boolean CloseHandle(ulong hObject ) Library "kernel32.dll"
    FUNCTION boolean ReadFile(ulong fhand, ref string lpbuffer, ulong numbyte, ref ulong bytesread, ulong lpover) LIBRARY "kernel32.dll"
    FUNCTION ulong CreateFileA(ref string fname, ulong f_access, ulong f_share, ulong f_sec, ulong f_create, ulong f_flag, ulong f_attrib) LIBRARY "kernel32.dll"
    Function Boolean WriteFile(uLong handle,ref string lpbuffer,ulong numbytes, ref ulong bytesread, ulong lpOverLaped) Library "Kernel32.dll"
    Function Boolean GetCommProperties(ulong hFile,ref COMMPROP lpCommProp ) Library "Kernel32.dll"
    Function Boolean BuildCommDCBA(ref string lpDef,ref DCB lpDCB ) Library "Kernel32.dll"
    Function Boolean SetCommState(ulong hCommDev,ref DCB lpdcb ) Library "Kernel32.dll"
    Function Boolean GetCommState(ulong hCommDev,ref DCB lpdcb ) Library "Kernel32.dll"
    Function ulong GetLastError() Library "Kernel32.dll"
    Function Boolean SetCommTimeouts(ulong hCommDev, ref COMMTIMEOUTS lpctmo ) Library "Kernel32.dll"
    Function Boolean PurgeComm(ulong hCommDev, ulong fdwAction ) Library "Kernel32.dll"

    [1]

  • 上一篇:在自己的pb程序中动态改变屏幕分辨率
    下一篇:仿windows优化大师界面(源码)