搜索了原来的贴子,但没有完整的代码
那位有收取邮件的完整代码,包括解码、附件。贴过来,不胜感激解码信息
Friend Function DecodeBase64String(str2Decode As String) As String'******************************************************************************
'
' Synopsis: Decode a Base 64 string
'
' Parameters: str2Decode - The base 64 encoded input string
'
' Return: decoded string
'
' Description:
' Coerce 4 base 64 encoded bytes into 3 decoded bytes by converting 4, 6 bit
' values (0 to 63) into 3, 8 bit values. Transform the 8 bit value into its
' ascii character equivalent. Stop converting at the end of the input string
' or when the first '=' (equal sign) is encountered.
'
'******************************************************************************Dim lPtr As Long
Dim iValue As Integer
Dim iLen As Integer
Dim iCtr As Integer
Dim Bits(1 To 4) As Byte
Dim strDecode As String' for each 4 character group....
For lPtr = 1 To Len(str2Decode) Step 4
iLen = 4
For iCtr = 0 To 3
' retrive the base 64 value, 4 at a time
iValue = InStr(1, BASE64CHR, Mid$(str2Decode, lPtr + iCtr, 1), vbBinaryCompare)
Select Case iValue
' A~Za~z0~9+/
Case 1 To 64: Bits(iCtr + 1) = iValue - 1
' =
Case 65
iLen = iCtr
Exit For
' not found
Case 0: Exit Function
End Select
Next
' convert the 4, 6 bit values into 3, 8 bit values
Bits(1) = Bits(1) * &H4 + (Bits(2) And &H30) \ &H10
Bits(2) = (Bits(2) And &HF) * &H10 + (Bits(3) And &H3C) \ &H4
Bits(3) = (Bits(3) And &H3) * &H40 + Bits(4)
' add the three new characters to the output string
For iCtr = 1 To iLen - 1
strDecode = strDecode & Chr$(Bits(iCtr))
NextNextDecodeBase64String = strDecodeEnd Function
那位有收取邮件的完整代码,包括解码、附件。贴过来,不胜感激解码信息
Friend Function DecodeBase64String(str2Decode As String) As String'******************************************************************************
'
' Synopsis: Decode a Base 64 string
'
' Parameters: str2Decode - The base 64 encoded input string
'
' Return: decoded string
'
' Description:
' Coerce 4 base 64 encoded bytes into 3 decoded bytes by converting 4, 6 bit
' values (0 to 63) into 3, 8 bit values. Transform the 8 bit value into its
' ascii character equivalent. Stop converting at the end of the input string
' or when the first '=' (equal sign) is encountered.
'
'******************************************************************************Dim lPtr As Long
Dim iValue As Integer
Dim iLen As Integer
Dim iCtr As Integer
Dim Bits(1 To 4) As Byte
Dim strDecode As String' for each 4 character group....
For lPtr = 1 To Len(str2Decode) Step 4
iLen = 4
For iCtr = 0 To 3
' retrive the base 64 value, 4 at a time
iValue = InStr(1, BASE64CHR, Mid$(str2Decode, lPtr + iCtr, 1), vbBinaryCompare)
Select Case iValue
' A~Za~z0~9+/
Case 1 To 64: Bits(iCtr + 1) = iValue - 1
' =
Case 65
iLen = iCtr
Exit For
' not found
Case 0: Exit Function
End Select
Next
' convert the 4, 6 bit values into 3, 8 bit values
Bits(1) = Bits(1) * &H4 + (Bits(2) And &H30) \ &H10
Bits(2) = (Bits(2) And &HF) * &H10 + (Bits(3) And &H3C) \ &H4
Bits(3) = (Bits(3) And &H3) * &H40 + Bits(4)
' add the three new characters to the output string
For iCtr = 1 To iLen - 1
strDecode = strDecode & Chr$(Bits(iCtr))
NextNextDecodeBase64String = strDecodeEnd Function
解决方案 »
- 简单问题.请各位高手帮忙!(等待中...)
- 如何减少Vb60编译后可执行文件的大小?
- 怎么把数据写入数据库(菜菜鸟的问题)
- ActiveReport 累计打印次数,当点报表上的print按钮并开始打印时触发哪个事件。
- 那里出错了?
- 关于Access数据库格式的问题,急!在线等待!
- 控件数组:如果程序在运行中有加载和卸载控件,那么如果知道控件是否已经被加载?
- 看看下面这个VB登录系统,高手指点下!
- 帮菜鸟解答下
- 如何在窗体右上角的最小化、最大化和关闭按钮旁加上自己按钮?就像ZipMagic2000那样。
- VB编程中如何用当前windows2000登录用户名去连接访问SQL2000?
- 窗体属性BorderStyle = 0时,如何在窗体右下脚控制窗体大小?
我有发送的控件,没有接受的控件,如果要
邮箱联系:[email protected]
等我搞到手后,一定放到网上,别让更多的人着急
是也不是??
1、怎样用Winsock通过一个有登陆认证的SMTP发送邮件,具体过程是什么?
2、据我了解登陆名和密码需要MDx之类的加密,用VB怎样实现?
3、另外想了解SMTP服务器的全部返回码,望大侠们不吝赐教!
QQ号:88974534
QQ号:88974534
这个原程序我前两天找到过,有16个ocx控件找不到。没法运行,只能打开部分代码看