简体   繁体   English

如何将 hex 文件嵌入到 C# Visual Studio 项目中?

[英]How to embed a hex file into a C# Visual Studio project?

I have a Visual Studio C# project windows form.我有一个 Visual Studio C# 项目窗口窗体。 It is a kind of updater, a software interface that I use to upload a hex file into a microcontroller via USB.它是一种更新程序,一种软件接口,我用它通过 USB 将十六进制文件上传到微控制器。 The user of the software need to click a button to open a window and navigate through PC directories to choose a hex file.该软件的用户需要单击一个按钮打开一个窗口并浏览 PC 目录以选择一个 hex 文件。 I want to change this, I don't want that the user have acccess to the hex file, I want to generate a unique software to a unique hex file, but in a way that the hex file is not visible or acessible outside the software, it stay embeded in the software.我想改变这个,我不想让用户访问 hex 文件,我想为一个独特的 hex 文件生成一个独特的软件,但是在某种程度上 hex 文件在软件之外是不可见或不可访问的, 它嵌入在软件中。 My doubt is, how to embed the hex file into the software?我的疑问是,如何将hex文件嵌入到软件中? Does someone have any tips or sugestions?有人有任何提示或建议吗?

You go to Ressources, say Add-Resource, New-File, and that's it.你去资源,说添加资源,新建文件,就是这样。 It will generate you a reference to a它将为您生成一个参考

  internal static byte[] <resourcename>

in.Resources.在.Resources.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将HTML文件嵌入C#visual studio项目中,然后使用Internet Explorer将其打开 - Embed HTML file in C# visual studio project and later open it using internet explorer 如何在Visual Studio C#项目中编译hlsl着色器文件 - How to compile hlsl shader file in Visual Studio C# project 如何在Visual Studio项目C#中引用包含的文件 - How to refer to included file inside a visual studio project c# C# Visual Studio:在程序集中嵌入 XML 文档文件 - C# Visual Studio: Embed XML Documentation File in Assembly 如何在 C# Windows forms 应用程序中嵌入 html 文件? - How to embed an html file in C# Windows forms application in Visual studio? 在 Visual Studio 中构建 C# 应用程序时,如何在可执行文件名中嵌入版本信息? - How to embed the version information in the executable file name when building C# application in Visual Studio? 如何在我的 Visual Studio Code c# 项目中设置默认的 c# 文件? - How do I set the default c# file in my Visual Studio Code c# Project? Visual C#十六进制代码到文本文件 - Visual c# hex code to text file 在Visual Studio 2010 C#项目中将.chm文件链接到.dll - Linking a .chm file to a .dll in Visual Studio 2010 C# Project 无法在Visual Studio C#上运行项目/文件 - Cannot run a project/file on visual studio c#
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM