0

I have a Visual Studio C# project windows form. It is a kind of updater, a software interface that I use to upload a hex file into a microcontroller via 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. 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. My doubt is, how to embed the hex file into the software ? Does someone have any tips or sugestions ?

Daniel
  • 107
  • 6
  • 3
    I'm not really sure what you mean by _"hex file"_ but I assume you're talking about some kind of binary file. Have you tried simply embedding the file as resource in your assembly? The following question is about embedding an .exe file within the applications assembly and might be helpful in your case too: https://stackoverflow.com/questions/35482994/c-how-to-embed-exe-file-into-resources – bassfader Nov 29 '19 at 11:58

1 Answers1

2

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.

Holger
  • 2,446
  • 1
  • 14
  • 13