当前注册人数423000人 邮箱: 密码: 注册新用户 忘记密码
首页 C/C++/MFC C# ASP.NET VB.NET MATLAB Android   站内搜索 下载代码说明/积分规则
为什么要注册?

1. 可以直接免费从本站下载代码,防止邮件发送不到您的邮箱,或登录不了国外网站

2. 可以设定关键字,当有您关心的代码收录时,邮件通知您

3. 对这里的代码进行评分和评论

4. 可以和大家一起分享你的源代码,得到更多的建议

Folder Coder

Windows目录加密

2007年12月22日
VB (VB 7.x, VB 8.0, VB 9.0, VB 6), VB
本程序实现一个很奇怪的加密手段,它可以把一整个目录加密成一个文件,然后,又可以把它们解密出来。
相关知识
Private Sub Code()
        Try
            'prepares the writer to write

            Dim fs As New FileStream("C:\Mitio\Locked.log",
                FileMode.Append)
            Dim sw As New StreamWriter(fs)
            ' sets the progressbar max value

            ProgressBar1.Maximum = lb.Items.Count
            For Each obj As Object In lb.Items
                Dim name As String = My.Computer.FileSystem.GetName(
                    obj.ToString)
                Dim bytes() As Byte
                ' reads the bytes from the specified fie & stores them in

                ' the array

                bytes = My.Computer.FileSystem.ReadAllBytes(obj.ToString)
                Dim bn As Integer = bytes.Length ' gets the length of the bytes

                ' appends the bytes of the array to the newly created

                ' Locked.locked file

                My.Computer.FileSystem.WriteAllBytes(
                    "C:\Mitio\Locked.Locked", bytes, True) 
                'writes the name of the file and the length of the

                'binaries in it

                sw.WriteLine(bn.ToString + "*" + name) 
                ProgressBar1.Value += 1 ' performs a step


            Next
            lb.Items.Clear() 'clears the list


            sw.Close() 'closes the writer

            fs.Close() 'and the file


            ProgressBar1.Value = 0 ' resets the  progressbar


        Catch ex As Exception
            ' if anything happens, you will be gently informed :D

            MsgBox(ex.Message)
        End Try
    End Sub
源代码原文下载:
Folder Coder A way to convert a folder into a file...

源码图片

点击链接查看大图
从本站下载附件及源代码(1个附件,已经成功下载305次)

最值得关注的外文源代码

Calculator
Find out Outlook Personal Folder and Jump to Outlook to show it
A GPS tracer application for Windows Mobile CE 5
Developing Windows Services using Visual Studio .NET
评论(评论是增加积分的一个有效途径)
字数在300字内
请如实评论
本源代码共评论53次,此处显示最近20次评论! 查看所有评论

kurma  2021年04月28日
内容不错呢
都是假象  2018年03月29日
多谢楼主
dandadekuse  2017年05月05日
内容不错呢
Baiyun  2016年08月30日
恩~谢谢楼主,我来验证一下
Sally  2015年05月06日
棒棒哒
wcxfairy  2014年06月23日
谢谢分享!
renmg123  2013年11月08日
恩~谢谢楼主,我来验证一下
youz  2013年09月30日
学习
pengpeng612  2013年03月21日
谢谢
cl05032  2013年03月20日
谢谢
gn_2012  2013年03月19日
看看
innocence  2012年09月24日
可以啊 楼主
yeeco  2012年07月16日
很好 谢谢啊
米奇  2012年06月28日
谢谢
小莉  2012年03月07日
不错呦
陈禧  2012年01月04日
好好学习,天天向上。
情缘  2011年12月06日
好的,谢谢
zyh329  2011年10月07日
感觉应该不错。
cx4359481  2011年09月16日
谢谢分享
qingyun  2011年04月02日
支持下
字数在300字内
请如实评论
200万国内源码搜索
CopyRight (C) codesoso.com 2007-2009 All Rights Reserved zhihuishi   免责声明