0

I want to be able to write and read resources with the ResourceManager class in Visual Basic .NET (2010) instead of using the Win32 API (UpdateResources)

I tried to first read resources like this:

Dim ResMan As New Resources.ResourceManager("Resources", System.Reflection.Assembly.GetExecutingAssembly())
Dim Bytes As Byte() = DirectCast(ResMan.GetObject("Bytes"), Byte())
ResMan.ReleaseAllResources()

And it worked, but then I tried to write resources, but it didn't work at all, I kept getting errors, and honestly my code was so dirty I felt ashamed.

So basically I need a way to write resources using ResourceManager.

Jeff Reed
  • 231
  • 1
  • 6
  • 23

1 Answers1

0

You might want to look at resx. Standalone resource files that can be read from and written to. You can use simple obfuscation if you don't want the data readable.

tinstaafl
  • 6,908
  • 2
  • 15
  • 22