资源描述:
《vb sdk 串口编程》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、VBSDK函数串口编程收藏viewplaincopytoclipboardprint?PrivateDeclareFunctionCreateFileLib"kernel32"_Alias"CreateFileA"(ByVallpFileNameAsString,_ByValdwDesiredAccessAsLong,ByValdwShareModeAsLong,_ByVallpSecurityAttributesAsLong,_ByValdwCreationDispositionAsLong,_ByValdwFlagsAnd
2、AttributesAsLong,ByValhTemplateFileAsLong)AsLongPrivateDeclareFunctionGetCommStateLib"kernel32"_(ByValhFileAsLong,ByReflpDCBAsDCB)AsLongPrivateDeclareFunctionSetCommStateLib"kernel32"_(ByValhFileAsLong,ByReflpDCBAsDCB)AsLongPrivateDeclareFunctionSetupCommLib"kernel3
3、2"(ByValhFileAsLong,_ByValdwInQueueAsLong,ByValdwOutQueueAsLong)AsLongPrivateDeclareFunctionPurgeCommLib"kernel32"_(ByValhFileAsLong,ByValdwFlagsAsLong)AsLongPrivateDeclareFunctionSetCommTimeoutsLib"kernel32"_(ByValhFileAsLong,ByReflpCommTimeoutsAsCOMMTIMEOUTS)AsLon
4、gPrivateDeclareFunctionCloseHandleLib"kernel32"(_ByValhObjectAsLong)AsLong'PrivateDeclareFunctionReadFileLib"kernel32"(ByValhFileAsLong,_lpBufferAsAny,ByValnNumberOfBytesToReadAsLong,lpNumberOfBytesReadAsLong,_lpOverlappedAsOVERLAPPED)AsLong'PrivateDeclareFunctionWr
5、iteFileLib"kernel32"(ByValhFileAsLong,_lpBufferAsAny,ByValnNumberOfBytesToWriteAsLong,lpNumberOfBytesWrittenAsLong,_lpOverlappedAsOVERLAPPED)AsLongPrivateDeclareFunctionWriteFileLib"kernel32"(_ByValhFileAsLong,lpBufferAsAny,_ByValnNumberOfBytesToWriteAsLong,_lpNumbe
6、rOfBytesWrittenAsLong,ByVallpOverlappedAsLong)AsLongDeclareFunctionReadFileLib"kernel32"(ByValhFileAsLong,_lpBufferAsAny,ByValnNumberOfBytesToReadAsLong,_lpNumberOfBytesReadAsLong,ByVallpOverlappedAsLong)AsLongConstPURGE_TXABORT=&H1ConstPURGE_RXABORT=&H2ConstPURGE_T
7、XCLEAR=&H4ConstPURGE_RXCLEAR=&H8ConstMAXDWORD=&HFFFFFFFFConstGENERIC_WRITE=&H40000000ConstGENERIC_READ=&H80000000ConstFILE_ATTRIBUTE_NORMAL=&H80ConstOPEN_EXISTING=3ConstFILE_FLAG_OVERLAPPED=&H40000000ConstINVALID_HANDLE_VALUE=-1PrivateTypeDCBDCBlengthAsLongBaudRateA
8、sLongfXXXAsLongwReservedAsIntegerXonLimAsIntegerXoffLimAsIntegerByteSizeAsByteParityAsByteStopBitsAsByteXonCharAsByteXoffCharAsByteErrorCh