|
He said:
D Shen wrote:
not close the application but ask input for missing parameters
;-PNnamdi told him how to do it.
David Stone
But Clinton wasn't a predictable, boring, aging, lying, eloquent, maintainer-of-the-status-quo. He was a predictable, boring-but-trying-to-look-hip, aging-and-fat-but-seemingly-oblivious-to-it, lying-but-in-sadly-blatant-ways, not-eloquent-but-trying-to-make-up-for-it-by-talking-even-more, bringer-in-of-scary-and-potentially-dangerous-new-policies. And there was also Al Gore. It just wasn't *right*.
Shog9
|
|
|
|
|
Yeah, misread the question completely. Such is life. I'm getting used to people pointing out stupid things I've said today.
I swear I should go back to bed
Paul
|
|
|
|
|
I've read the documentation on how to install an NT service using .NET but I'm unsure of exactly how it works. I 've created the installer object but hte documentation is unclear of what I should do in my Custom Action or even how to set one up properly. Does anyone know of a good tutorial on this?
Jared
jparsons@jparsons.org
www.prism.gatech.edu/~gte477n
|
|
|
|
|
I'm actually working on an article that includes coverage of services. Here's the code I use to install a service:
[RunInstaller(true)] public class ServiceInstaller: Installer
{
private System.ServiceProcess.ServiceInstaller svcInst;
private System.ServiceProcess.ServiceProcessInstaller processInstaller;
public ServiceInstaller()
{
processInstaller = new System.ServiceProcess.ServiceProcessInstaller();
svcInst = new System.ServiceProcess.ServiceInstaller();
processInstaller.Account = ServiceAccount.LocalSystem;
svcInst.StartType = ServiceStartMode.Manual;
svcInst.ServiceName = "EWService";
svcInst.DisplayName="EW Sample Service";
Installers.Add(svcInst);
Installers.Add(processInstaller);
}
}
The code basically establishes the service's name, display name, startup, and logon. Use InstallUtil to install the service and configure it as in the preceding class.
Erik Westermann
Author, Learn XML In A Weekend ^ (October 2002)
|
|
|
|
|
Can someone help me understand the Evidence objects as they pertain to Assembly.LoadFrom. I'd like to be able to load Assemblies from a file share or mapped drive, but have security issues. I'm not sure how to use the Evidence to do this or if I can really, but before I go flinging code I'd like some knowledge.
|
|
|
|
|
ya so apparently it is working... I'd still like to understand how it works and how to use it because it does not work with file shares (ie file://\\server\assemblies\asdf.dll).
Tanka
|
|
|
|
|
Hello,
I have a ASP.NET page that is rendered. However, I would like to store the rendered html code in a string. Is that possible?
Thanks!
|
|
|
|
|
Hi all,
It seems irrelavant forum if i ask this question here, but since i use C# i think i can get help from here.
Question is, how to reloading/refreshing/restarting explorer.exe from C#?
What i like to do is, after editing explorer-related registry, i don't want to restart my computer, but instead, i just want to refresh the explorer.exe so it can read the registry back.
Or, maybe there is another method/way to refresh the registry in general?
Target machine is Win 98
|
|
|
|
|
I don't think at all that's possible...
It shouldn't be so...
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
If you are using Windows 2k or XP, open up the Task Manager, click the Processes tab, click explorer.exe and thick click End Process.
The task bar will dissapear along with your desktop, Task Manager will stay open. Sometimes explorer.exe will restart, not always though. So go to the File menu and to New Task (Run...) In the box type explorer.exe and click OK. Your desktop should reload. Also useful if the shell crashes and you don't want to restart b/c you have a lot of programs open.
Jason Gerard
|
|
|
|
|
I write a class and build it in a dll.I used it in a application.And then I
changed my code in some function,and rebuilded it.
Now I need change the dll at runtime,how to do this.
At win32,it will be "loadlibrary"and "freelibrary",at .net,?????
In addition,I didn't change define of the class.
lost my way
|
|
|
|
|
|
yes ,it can load a dll,but I will overwrite a dll.That means I must unload the dll first,and then overwrite it ,and load it again.
but use assembly ,you can only load a dll,can't unload it.I cann't change the using dll.
????
lost my way
|
|
|
|
|
fftongzhi wrote:
but use assembly ,you can only load a dll,can't unload it.
Unfortunately , the only way to unload an assembly is to unload the appdomain. You will need to load the assembly in a different AppDomain to succeed with your problem. Look at the Supergraph Calculator example on MSDN by Eric Gunnerson (2 parts).
I have attempted this , and failed miserably. So good luck.
|
|
|
|
|
Let me try.............................
lost my way
|
|
|
|
|
Very unfortunately,it don't work either.
It is my codes.
AppDomain appDomain = AppDomain.CreateDomain("mydomain");
Assembly a = appDomain.Load("dlltochange");
Type t = a.GetType("dlltochange.Class1");
MethodInfo mi = t.GetMethod("showstring");
object[] parameter=new object[1];
parameter[0]="hello world";
object obj = Activator.CreateInstance(t);
mi.Invoke(obj,parameter);
AppDomain.Unload(appDomain);
dlltochange is a dll,have Class1 in it,showstring is a function of Class1.
I called the unload,and the dll is in use yet.
And I cann't move the dll to another directory.the parameter of load method can not accept a file name with path.
Will I fail ultimately? Is this a limitation of .net ???
lost my way
|
|
|
|
|
I'm sure there must be a better way but as a workaround, can't you just "DllImport" LoadLibrary and FreeLibrary into your program?
Paul
|
|
|
|
|
And can it load a .net dll? Are you sure?
lost my way
|
|
|
|
|
Nah... course I'm not sure. But are you sure it won't?
Paul
|
|
|
|
|
|
Haha, if you think, you will get think you will get this in few hours, forget it, I broke my head for days on end till I was instutionalized for MS migrane.
Just try, try again
|
|
|
|
|
Before a hard try,find a broad way is important.Do you think so?
And can you make a demo of importing .net dll?
thanks.
lost my way
|
|
|
|
|
Sorry was gonna add this earlier
fftongzhi wrote:
the parameter of load method can not accept a file name with path.
Appends the specified name of the directory to the private path.
[ClassInterface(ClassInterfaceType.None)]<br />
public void AppendPrivatePath(<br />
string path<br />
);
|
|
|
|
|
I have tried it early,but it doesn't work.The dll I load is the dll in current path.append path is useless;
Now the major problem is the dll cann't unload.
lost my way
|
|
|
|
|
Hi
I really want to see this in action too (beside eric's app)!
Have you tried the shadow path, as far as I remember the app will load the assembly in some randon generated directory?
Also, if I remember correctly, Eric makes use of a loader assembly. I cant remmeber the details though
Good luck
|
|
|
|