Juan
Juan

Reputation: 15725

Is it possible to edit an embed resource file during runtime?

I really don't think it is possible on a reasonably easy way but I'm asking just in case. I'm working on Visual C# Express 2010. I want to do this because it would probably be the easiest way to make a trial version that expires after certain amount of runs. Maybe not very safe way, but don't need any more safety at the moment, just simplicity.

Upvotes: 1

Views: 1095

Answers (2)

Camilo Sanchez
Camilo Sanchez

Reputation: 1515

embedding a resource file would imply changing the assembly, if this assembly is being executed I don't think what you want is possible

if you want is a trial system, make a webservice and call a method programCanRunInComputerWithMAC(mac:string):bool you'd call this when the application loads

Upvotes: 0

Preet Sangha
Preet Sangha

Reputation: 65556

You can create an assembly at runtime so you could embed the resource in that and then load it into your AppDomain.

Upvotes: 1

Related Questions