CodePudding user response:
Do not know whether useful:http://www.sybasebbs.com/forum.php? Mod=viewthread& Tid=4695 & amp; Extra=page % 3 d1
CodePudding user response:
You can use mscom controlsCodePudding user response:
Using mscom controls, Microsoft's east is good, I used to feel goodCodePudding user response:
I also want to know, the data such as the com is$3 a 瑂 *
Converted to binary:
24 06 07 05 01 33 01 00 61 17 08 AC 73 1 a
How can I put these data read out? Read out is a string or an array?
CodePudding user response:
Mscomm32. OcxRead it on the fourth floor are the hexadecimal number, can be converted to decimal and binary
CodePudding user response:
First step: the Mscomm. SRG Mscomm32. Ocx, Mscomm32. Dep three files are copied to the system folder, note that the Mscomm control is authorized, so it should be use the "license" Licence registration in the registry, the next step is registration method, as to why do you do that, can look at the following web site: http://support.microsoft.com/support/kb/articles/q151/7/71.aspStep 2: use under Windows registration tools regsvr32 registered the OCX controls, click on "start" - & gt;" Run ", then fill in in with (assuming installed in C disk operation, WIN2000) :
Regsvr32 C: \ winnt \ system32 \ Mscomm32 ocx
Step 3: manually create a primary key in the registry entry: in the first click on the "start" - & gt;" Run ", then fill in the regedit command to open the registry, find HKEY_CLASSES_ROOT \ Licenses, add a primary key
E830 4250-6 ac2-11 cf - 8 adb - 00 aa00c00905 and sets the content to:
Kjljvjjjoquqmjjjvpqqkqmqykypoqjquoun
Completion of registration, choose the ole control in PB, mscomm32
Mport=2
ole_2.object.comOle_2. Object. Settings="9600, n, 8, 1"//rate of serial port 9600, "n" is no check, eight data bits, stop bit 1
Ole_2. Object. Inputlen=0//read all
Ole_2. Object. An inputmode=1//read in binary mode
Ole_2. Object. Portopen=true
The integer li_i
Blob lb_zero, lb_temp
Blob lb_out1
Lb_temp=blob (" ~ h01-2 encodingUTF16BE!)
Lb_zero=blobmid (lb_temp, 1, 1)
Lb_out1=blob (" ~ h01-2 "+" ~ h04 encodingUTF16BE!) + + lb_zero lb_zero + blob (" ~ h40 encodingUTF16BE!) + + lb_zero lb_zero + blob (" ~ h10 "+" ~ hf0 "+" ~ h12, "encodingUTF16BE!)
For li_i=2 to len (lb_out1) step 2
Ib_yzout +=blobmid (li_i lb_out1, 1)
End for
Ole_2. The output=ib_yzout