VB里另一种更高效的Base64编码与解码算法
Option Explicit
'名称: Base64编码/解码模块
'Name: Base64 Encode & Decode Module
'作者: KiteGirl [中国]
'programmer: KiteGirl [China]
Private priBitMoveTable() As Byte '移位缓冲表
Private priBitMoveTable_CellReady() As Boolean '移位缓冲表标志表
Private priBitMoveTable_Create As Boolean '移位缓冲表创建标志
Private priEncodeTable() As Byte '编码表(素码转Base64)
Private priEncodeTable_Create As Boolean
Private priDecodeTable() As Byte '解码表(Base64转素码)
Private priDecodeTable_Create As Boolean
Private Declare Sub Base64_CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (ByRef pDestination As Any, ByRef pSource As Any, ByVal pLength As Long)
Private Const conBase64_CodeTableStrng As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
Private Const conBase64_PatchCode As Byte = 61
Private Type tpBase64_Dollop2438 '24Bit(8Bit*3Byte)数据块
btBytes(0 To 2) As Byte
End Type
Private Type tpBase64_Dollop2446 '24Bit(6Bit*4Byte)数据块
btBytes(0 To 3) As Byte
End Type
'解码
Public Sub Base64_Decode(ByRef tOutBytes() As Byte, ByRef pBytes() As Byte, Optional ByVal pPatchCode As Byte = conBase64_PatchCode)
'Base64Decode函数
'语法:[tOutBytes()] = Base64Decode(pBytes(), [pPatchCode])
'功能:将Byte数组表示的Base64编码Ascii字节数组解码为Byte字节数组,并返回。
'参数:byte pBytes() '必要参数。Byte数组表示的Base64编码数据。
' byte pPatchCode '可选参数。冗余字节追加码。默认为61("="的Ascii码)
'返回:byte tOutBytes() 'Byte数组。
'示例:
' Dim tSurString As String
' Dim tSurBytes() As Byte
' tSurString = "S2l0ZUdpcmzKx7j2usO6otfT"
' tSurBytes() = StrConv(tSurString, vbfromUnicode)
' Dim tDesString As String
' Dim tDesBytes() As Byte
' tDesBytes() = Base64Decode(tSurBy
相关文档:
添加2个text,一个command,一个 WebBrowser
Dim vDoc, vTag
Dim i As Integer
Private Sub Command1_Click()
Set vDoc = WebBrowser1.Document
For i = 0 To vDoc.All.length - 1
If UCase(vDoc.All(i).tagName) = "INPUT" Then
Set vTag = vDoc.All(i)
If vTag.Type = "text" Then
Select Case vTag.Nam ......
程序隐形的原理
对于一个隐形程序而言,最基本的要求是:
1. 不在桌面出现界面;
2. 不在任务栏出现图标;
3. 程序名从任务管理器名单中消失。
Public Declare Function GetCurrentProcessId Lib “kernel32” () As Long
’获得当前进程ID函数的声明
Public Declare Functio ......
http://www.carlosag.net/Tools/CodeTranslator/ 这个也许学计算机的哥哥姐姐们会用得到,,就转了希望多多支持哦 西西 用得到就顶哦
差点忘了哦 ,藕还有一个sql的插件很好用的呀。。。。有想要的就留言下要咯。。。。。 ......
在开发中保持良好的编码规范是十分重要的。我所采用的新的VB.net/ASP.NET编码规范,是一种被证明能明显改善代码可读性,并有助于代码管理、分类的编码规范。采用这种编码规范,能避免如匈牙利命名法带来的繁长前缀,便于记忆变量的用途。下面的介绍这种编码规范。
一、类型级单位的命名
1、类
□以Class声明的类,都必须 ......