resourcelib icon indicating copy to clipboard operation
resourcelib copied to clipboard

Save StringResource crashing

Open kalpalkeeper opened this issue 10 years ago • 3 comments

Replacing a string in a .dll file.. IE: (String Table, 1, 1033, 10 "TEST"

Code:

string filename = AppDomain.CurrentDomain.BaseDirectory + "my.dll";
                TakeOwn(filename);
                StringResource sr = new StringResource();
                sr.Name = new ResourceId(StringResource.GetBlockId(10));
                sr.LoadFrom(filename);
                sr[10] = "TEST";
                sr.SaveTo(filename); //error here

I get this error:

System.ComponentModel.Win32Exception: The request is not supported
   at Vestris.ResourceLib.Resource.SaveTo(String filename, ResourceId type, Reso
urceId name, UInt16 lang, Byte[] data))

Any help ?

kalpalkeeper avatar Mar 23 '15 22:03 kalpalkeeper

There must be something in that resource that isn't working. The test here works, you'll have to dig through it :(

dblock avatar Mar 24 '15 10:03 dblock

Thanks for quick reply dblock. I will give it a shot. :)

kalpalkeeper avatar Mar 24 '15 21:03 kalpalkeeper

@kalpalkeeper is this still an issue?

thoemmi avatar Mar 26 '16 23:03 thoemmi