比如打开了test.dll文件,如果让他显示在文本中?还有如何替换里面的字串。比如将里面的ff替换成00,谢谢了。
Dim fileContents As Byte()
fileContents = My.Computer.FileSystem.ReadAllBytes("e:\test.dll")
Dim fileContents As Byte()
fileContents = My.Computer.FileSystem.ReadAllBytes("e:\test.dll")
解决方案 »
- 怎样实现form中的所有控件随着form同步放大缩小.
- 请问如何用VB设置IE的代理服务器地址和端口?解决后立刻给分,决不拖延!!!
- 在线等待高手~~~送分啊~~~~~
- 在Win2k Server中,如何判断当前用户(或应用)是否有SE_SHUTDOWN_NAME权限?在线...
- 怎样在程序中添加声音?
- 请问那种控件可以之间显示国标码?
- 请问设置系统分辨率的API函数(在线等待,立刻结分)
- 这段模块里的代码那错了??
- 如何禁止鼠标操作!!
- 求助:有关WINSOCK控件的问题!
- 如何把注册表中unistall的displayname 显示出来?(100分)
- 如何获取临时表的表名、读取临时表的记录?
Dim fileContents As Byte()
fileContents = My.Computer.FileSystem.ReadAllBytes("e:\test.dll")
for i=0 to ubound(fileContents)
if filecontents(i)=&HFF then filecontents(i)=0
next
字节显示成16进制 就用 hex 函数逐个转换了
dim fileHexs() as string
redim filehexs(ubound(fileContents))
for i= 0 to ubound(fileContents)
filehexs(i)=hex(fileContents(i))
'假如每32个字节显示一行加下面这句
if i mod 32 = 31 then filehexs(i)=filehexs(i)+vbcrlf
next
text1=join(filehexs," ")
if i mod 32 = 31 then filehexs(i)=filehexs(i)+vbcrlf
filecontents(i)=val("&h"+replace(filehexs(i),vbcrlf,""))
next
redim filecontents(ubound(filehexs))
for i= 0 to ubound(filehexs)
if i mod 32 = 31 then filehexs(i)=filehexs(i)+vbcrlf
filecontents(i)=val("&h"+replace(filehexs(i),vbcrlf,""))
next
if i mod 32 = 31 then filehexs(i)=filehexs(i)+vbcrlf
多余了