[求助]手上有个被加密的VBA文件那位大哥可否帮忙解开
<p>我用Office Key or Advanced VBA Password Recovery PRO or VBA Password Bypasser这三个都解不开,这是一家台湾公司写的读取硬盘序列号的小程序</p> <p>Declare Function GetVolumeinformation Lib "Kernel32.dll" Alias "GetVolumeInformationA" (ByVal _<br/> lpRootPathName As String, ByVal lpVolumeNameBuffer As _<br/> String, ByVal nVolumeNameSize As Integer, _<br/> lpVolumeSerialNumber As Long, lpMaximumComponentLength _<br/> As Long, lpFileSystemFlags As Long, ByVal _<br/> lpFileSystemNameBuffer As String, ByVal _<br/> nFileSystemNameSize As Long) As Long<br/> <br/> Function GetSerialNumber(strDrive As String) As Long<br/> <br/> Dim SerialNum As Long<br/> <br/> Dim Res As Long<br/> Dim Temp1 As String<br/> Dim Temp2 As String<br/> <br/> Temp1 = String$(255, Chr$(0))<br/> Temp2 = String$(255, Chr$(0))<br/> <br/> Res = GetVolumeinformation(strDrive, Temp1, _<br/> Len(Temp1), SerialNum, 0, 0, Temp2, Len(Temp2))<br/> <br/> GetSerialNumber = SerialNum<br/> <br/> End Function<br/> <br/> Sub GetNum()<br/> Dim DNum As String<br/> DNum = GetSerialNumber("C:\")<br/> ThisDrawing.SetVariable "USERS1", DNum<br/> End Sub</p><p></p> 大哥你能给我密码吗?I服了YOU OR THANK YOU <p>下面有一个是VB写的获取硬盘序列号的代码:</p><p>Private Declare Function GetVolumeInformation Lib "kernel32.dll" Alias _<br/> "GetVolumeInformationA" (ByVal lpRootPathName As String, _<br/> ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Integer, _<br/> lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, _<br/> lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, _<br/> ByVal nFileSystemNameSize As Long) As Long</p><p>Private Sub Command1_Click()<br/> Dim mySerial As Long<br/> Dim mylong As Long<br/> mystr = String$(255, Chr$(0))<br/> mytype = String$(255, Chr$(0))<br/> If Right(Text1.Text, 1) <> "\" Then Text1.Text = Text1.Text & "\"<br/> sRoot = Text1.Text '设定盘名<br/> mylong = GetVolumeInformation(sRoot, mystr, Len(mystr), mySerial, 0, 0, mytype, Len(mytype))<br/> Text2.Text = mySerial 'TEXT2 存放盘序列号<br/>End Sub</p><p>Private Sub Command3_Click()<br/> End<br/>End Sub</p><p></p> 是一样的 <p>这个论坛就有。自己搜下我的贴子。</p> 没看明白 本帖最后由 作者 于 2007-3-13 1:10:42 编辑 <br /><br /> <p>Declare Function GetVolumeinformation Lib "Kernel32.dll" Alias "GetVolumeInformationA" (ByVal _<br/> lpRootPathName As String, ByVal lpVolumeNameBuffer As _<br/> String, ByVal nVolumeNameSize As Integer, _<br/> lpVolumeSerialNumber As Long, lpMaximumComponentLength _<br/> As Long, lpFileSystemFlags As Long, ByVal _<br/> lpFileSystemNameBuffer As String, ByVal _<br/> nFileSystemNameSize As Long) As Long<br/> <br/> Function GetSerialNumber(strDrive As String) As Long<br/> <br/> Dim SerialNum As Long<br/> <br/> Dim Res As Long<br/> Dim Temp1 As String<br/> Dim Temp2 As String<br/> <br/> Temp1 = String$(255, Chr$(0))<br/> Temp2 = String$(255, Chr$(0))<br/> <br/> Res = GetVolumeinformation(strDrive, Temp1, _<br/> Len(Temp1), SerialNum, 0, 0, Temp2, Len(Temp2))<br/> <br/> GetSerialNumber = SerialNum<br/> <br/> End Function<br/> <br/> Sub GetNum()<br/> Dim DNum As String<br/> DNum = GetSerialNumber("C:\")<br/> ThisDrawing.SetVariable "USERS1", DNum<br/> End Sub</p><p>H××兄更胜一筹</p>
页:
[1]