如何在Visual Basic中读取/访问文件的二进制文件,如(.MP4,.ISO,.MP3等) [英] How Read/Access binary of files like(.MP4, .ISO , .MP3 etc) in visual basic

查看:82
本文介绍了如何在Visual Basic中读取/访问文件的二进制文件,如(.MP4,.ISO,.MP3等)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都知道计算机处理二进制(0s和1s)。

每个文件/数据都有二进制源。

我想阅读/访问和编辑Visual Basic中的数据/文件的二进制文件,如(.MP4,.MP3,.ISO等)。

怎么办?

解决方案

有很多方法:最简单的是:

  Dim 数据作为 字节()= File.ReadAllBytes(  D:\Temp \ MyVideo.mp4
data( 0 )= CByte (& Hff)
File.WriteAllBytes( D:\Temp \ MyModifiedVideo.mp4,bytes)



但如果你这样做的话,不要指望该文件能够正常工作! :笑:


As anyone knows that computer working on binary (0s and 1s).
Every file/data have its binary source.
I want to Read/Access and edit binary of data/files like(.MP4 , .MP3, .ISO etc) in visual basic.
How can is do that?

解决方案

There are a huge number of ways: the simplest is:

Dim data As Byte() = File.ReadAllBytes("D:\Temp\MyVideo.mp4")
data(0) = CByte(&Hff)
File.WriteAllBytes("D:\Temp\MyModifiedVideo.mp4", bytes)


But don''t expect the file to work if you do exactly that! :laugh:


这篇关于如何在Visual Basic中读取/访问文件的二进制文件,如(.MP4,.ISO,.MP3等)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆