|
From: Colby Africa on 6 Nov 2007 09:58 Hey ThunderMusic, Take a look at this article: http://www.codeproject.com/useritems/LoadExeIntoAssembly.asp "This example shows how to load an application and run from memory system. After the application load, you can use it without the source EXE file (usually blocked from the system). Useful when you don't have to have the source EXE file on HDD (e.g. on a USB key)." Colby Africa http://colbyafrica.blogspot.com
From: ThunderMusic on 6 Nov 2007 09:56 Hi, ok, now... since C# seems to require an on-disk assembly, would it be possible to create like a virtual disk in-memory (like a virtual drive) where C# could read what it needs to but where the user could not have access to? Thanks ThunderMusic "ThunderMusic" <NoSpAmdanlatathotmaildotcom(a)NoSpAm.com> wrote in message news:%232re4EIIIHA.5400(a)TK2MSFTNGP04.phx.gbl... > Hi, > I'm trying to make something work and I'm pretty sure it can be done, but > I can't get it working. > > I have a encrypted file that contains everything my software needs: exe, > dlls, et al. I want to make a "loader" that will decrypt the file and get > all parts in memory and run the exe in-memory without dropping it to the > disk. Is it possible or not? and how can I do it? I absolutely dont need > to reference the dlls from my loader, it only needs to call the exe and > then the exe could find it's own dlls. > > As an other option... is there some place where I could place the file on > the disk without the user being able to access them? I mean, like a > virtual disk reserved exclusively to my own "Loader" application? > > thanks > > ThunderMusic >
From: Colby Africa on 6 Nov 2007 10:14 A RAM disk would be wonderful, but that is implemented as a device driver... You could take a look at memory mapped files: http://www.winterdom.com/dev/dotnet/index.html
From: Nicholas Paldino [.NET/C# MVP] on 6 Nov 2007 11:18 Yes, it is possible, but it is not pretty. You are going to have to create a custom host for the assembly, which would probe the encyrpted exe and tell the CLR which assemblies are loaded, etc, etc. Look into custom CLR hosts for more information. -- - Nicholas Paldino [.NET/C# MVP] - mvp(a)spam.guard.caspershouse.com "ThunderMusic" <NoSpAmdanlatathotmaildotcom(a)NoSpAm.com> wrote in message news:%232re4EIIIHA.5400(a)TK2MSFTNGP04.phx.gbl... > Hi, > I'm trying to make something work and I'm pretty sure it can be done, but > I can't get it working. > > I have a encrypted file that contains everything my software needs: exe, > dlls, et al. I want to make a "loader" that will decrypt the file and get > all parts in memory and run the exe in-memory without dropping it to the > disk. Is it possible or not? and how can I do it? I absolutely dont need > to reference the dlls from my loader, it only needs to call the exe and > then the exe could find it's own dlls. > > As an other option... is there some place where I could place the file on > the disk without the user being able to access them? I mean, like a > virtual disk reserved exclusively to my own "Loader" application? > > thanks > > ThunderMusic >
From: ThunderMusic on 6 Nov 2007 11:21 This is great if you load an exe with no dll attached. but I have a some dll... I tried to use the LoadModule method but the name I specify is not what is expected from the method. How can I load the dlls the exe needs to run? the dlls are in memory too. Thanks ThunderMusic "Colby Africa" <colby.africa(a)gmail.com> wrote in message news:1194361107.396150.214670(a)k79g2000hse.googlegroups.com... > Hey ThunderMusic, > > Take a look at this article: > http://www.codeproject.com/useritems/LoadExeIntoAssembly.asp > > "This example shows how to load an application and run from memory > system. After the application load, you can use it without the source > EXE file (usually blocked from the system). Useful when you don't have > to have the source EXE file on HDD (e.g. on a USB key)." > > > Colby Africa > http://colbyafrica.blogspot.com > >
|
Next
|
Last
Pages: 1 2 3 Prev: process exit event and thread synchronization Next: Get UserPrincipalName |