VB¼Ó½âÃÜ´úÂë
Function crypt(Action As String, Key As String, Src As String) As String
'Action
' E encrypts, D decrypts,
'Key is a unique string needed to en/decrypt (either
' hardcode or setup something for the user to enter.
'Src is the string to be en/decrypted.
On Error GoTo errHandler
Dim count As Integer, KeyPos As Integer, KeyLen As Integer, SrcAsc As Integer
Dim Dest As String, Offset As Integer, TmpSrcAsc, SrcPos As Integer
KeyLen = Len(Key)
If Action = "E" Then
Randomize
Offset = (Rnd * 10000 Mod 255) + 1
Dest = Hex$(Offset)
For SrcPos = 1 To Len(Src)
SrcAsc = (Asc(Mid$(Src, SrcPos, 1)) + Offset) Mod 255
If KeyPos < KeyLen Then KeyPos = KeyPos + 1 Else KeyPos = 1
'Fill Dest$ with HEX representation of Encrypted field
'Hex used to keep nasties such as eof or lf from mangling stream
'Use format$ to make Hex$ return " 0" instead of "0" when the same
'values are Xor'ed together (Null) - keeps placeholder for decrypt
SrcAsc = SrcAsc Xor Asc(Mid$(Key, KeyPos, 1))
Dest = Dest + Format$(Hex$(SrcAsc), "@@")
Offset = SrcAsc
Next
ElseIf Action = "D" Then
Offset = Val("&H" + Left$(Src, 2))
For SrcPos = 3 To Len(Src) Step 2
SrcAsc = Val("&H" + Trim(Mid$(Src, SrcPos, 2)))
&
Ïà¹ØÎĵµ£º
·ÖÀࣺVBѧϰ ×ֺţº ´ó´ó ÖÐÖРСС mid(×Ö·û´®£¬´ÓµÚ¼¸¸ö¿ªÊ¼£¬³¤¶È) ÔÚ[×Ö·û´®]ÖÐ[´ÓµÚ¼¸¸ö¿ªÊ¼]È¡³ö[³¤¶È¸ö×Ö·û´®]
ÀýÈç mid("СÐÀÎÞµÐ",1,3) Ôò·µ»Ø "СÐÀÎÞ"
instr(´ÓµÚ¼¸¸ö¿ªÊ¼,×Ö·û´®1,×Ö·û´®2) ´Ó¹æ¶¨µÄλÖÿªÊ¼²éÕÒ£¬·µ»Ø×Ö·û´®2ÔÚ×Ö·û´®1Öе ......
VB
If MSComm1.PortOpen = True Then MSComm1.PortOpen = False
MSComm1.CommPort = i1
MSComm1.PortOpen = True
MSComm1.InputMode = comInputModeBinary
MSComm1.InBufferCount = 0
& ......
Óɵ×ÖÁÉÏÊÇ£º
• ÍйÜ×ÊÔ´
• WMI »ù´¡½á¹¹
• ʹÓÃÕß
ÍйÜ×ÊÔ´
ÍйÜ×ÊÔ´ÊÇÈÎÒâÂß¼»òÎïÀí×é¼þ£¬Í¨¹ýʹ ......
Ò»¡£Êý¾ÝÀàÐÍ
Byte 1
×Ö½Ú ÎÞ·ûºÅ
Interger 2
×Ö½Ú
Long 4
×Ö½Ú
Float 4
×Ö½Ú
Double 8
×Ö½Ú
String
Date
Boolean
Currency
Variant
2.
±ä³¤×Ö·û´®ºÍ¶¨³¤×Ö·û
ϵͳĬÈϳõʼֵΪ¿Õ×Ö·û´®;
±ä³¤×Ö·û´®£ºdi ......
Private Sub Command1_Click()
Dim dso As New XMLDSOControl
Dim doc As IXMLDOMDocument
Set doc = dso.XMLDocument
Dim rel As IXMLDOMNodeList
Set x = CreateObject("Microsoft.XMLHTTP")
x.Open "GET", "http://127.0.0.1:8080/emrb/Mrbmodel?action=dis&u ......