Interesting. Not heard of that before, but I'm curious as to how you'd actually use it. For instance, say I wanted to store a password someone had entered into a textbox - that's already available in unencrypted form in the Text property.
Even copying the password character by character which seems to be the norm with this thing would mean presumably interning the Text property of the Textbox - we've already lost the battle.
I think I'm missing something here - although its good that we can store things in memory in encrypted form how do we populate it, access it, compare it etc?
That does seem to be a problem on close inspection - to use it, it seems you have to get a pointer to unmanaged memory and then copy it out. Not sure this is going to quite do what I want - I'll keep looking tho.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
Now, I have the c# code to execute a vbscript on a remote machine which then returns success or failure.
Now I just can not figure out how to return into c# the result of the script that gets executed.
I am using WMI at present.
Any thought please?
For two days, it has been suggested you look at using the Process class.
If you run your script from within a process, you can redirect the stdout and read it within your program.
The other wapproach is in when you launch your process to redirect standard output to a file. Once your script has completed then read in the content of the file.
I will not google this for you, but there is a lot of information about redirecting output and launching processes from C#. Go read up on it, have a try and come back when you hit a wall. NB - that means yoiu have tried for more than five minutes.
i am using for loop and assigning value to a string.the reference of the memory get cleared after exiting the loop but the memory exits ,so I wanna clear heap memory without using Garbage collection within the loop.
so I wanna clear heap memory without using Garbage collection within the loop
And how would you expect this to work? Strings are managed resources, so are subject to being tidied up by the Garbage Collector. Without using an unmanaged string, I couldn't see an easy way to satisfy this requirement. What could you possibly be doing that you wouldn't want to rely on the GC here?
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.