|
Is that AppDomain.SetCachePath(string)??
It doesn't work too.
yes ,Eric made a loader,but what is the key??
lost my way
|
|
|
|
|
fftongzhi wrote:
Is that AppDomain.SetCachePath(string)??
No
You need to set this via AppDomainSetup in AppDomain.CreateDomain(). I think it has to be done via that function else it will not function.
Its been a while (May) since I attempted this.
fftongzhi wrote:
yes ,Eric made a loader,but what is the key??
I cant remember the exact details, but he did it, so I guess thats necessary
|
|
|
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp03122002.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp05162002.asp
Eric ,he is a expert.;)
lost my way
|
|
|
|
|
Any body can help me?????
ooooooooooh!!
lost my way
|
|
|
|
|
I've been told that VS .NET won't work on NT 4.0. Has somebody installed it successfully?
BTW. Do you have any idea, how can I install NT4.0 on a machine that already has Windows XP, without do destroy the WinXP installation? Is it possible at all?
Any tips are appreciated, thank you!
|
|
|
|
|
VS.NET should be fine, but ASP.NET won't run on NT 4.0 (IIS 4.0)
No idea as to your second question.
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
Zinj wrote:
BTW. Do you have any idea, how can I install NT4.0 on a machine that already has Windows XP, without do destroy the WinXP installation? Is it possible at all?
Try a emulator like VMWare. Very slow though. But OK for testing
OR you can be adventurous and install NT4 on a different partition, it might overwrite the bootloader (i cant remember now ), but you can run XP setup up to first reboot and cancel, the boot loader should be replaced and existing XP boot entry should still be there (make a backup of boot.ini). Wow, its been a few years since I worked on that stuff
|
|
|
|
|
I have C++ code that uses the function CryptHashMessage that I am trying to port to C#. Do anyone know of something in C#, that does the same thing?
I believe I searched the System.Security.Cryptography completely.
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
I want to format TimeSpan to output "hh:mm:ss", but when I use the generic TimeSpan.ToString() method, it returns "hh:mm:ss.ffffff". I don't need the fractions of seconds, just the plain seconds.
If I try to do something like,
textBox1.Text = span.ToString("hh:mm:ss");
I get a error,
//error - No overload for method 'ToString' takes '1' arguments.
ToString is listed as overridden but not overloaded in the TimeSpan help
docs with VS.Net.
I've tried converting to,
DateTime dt = new DateTime(span.Ticks);
labelClock.Text= dt.ToString("hh:mm:ss");
But this results with something like, "12:00:00".
Any suggestions?
|
|
|
|
|
Try this
string tempstr = timespan.ToString();<br />
labelClock.Text = tempstr.Substring(0, tempstr.LastIndexOf(".") - 1);
or ... try this (I'm just guessing )
timespan = Timespan.FromSeconds((int)timespan.TotalSeconds);
|
|
|
|
|
leppie wrote:
tempstr.Substring(0, tempstr.LastIndexOf(".") - 1);
Dangerous. Days and fractions of seconds are optional. You could end up getting 8.01:01:01 (8 days, 1 hour, 1 minute, 1 second) and just return "8".
I'd guess the best way is
string str = String.Format("{0:00}:{1:00}:{2:00}", timespan.Hours, timespan.Minutes, timespan.Seconds)
but there may be a better way than that.
Paul
|
|
|
|
|
Thanks leppie and Paul -- That will work, yea I guess this is one for the FAQ on .NET.
|
|
|
|
|
I am looking for an intuitive way to allow users to reorder a treeview by dragging and dropping, though they can already drop on other nodes and update the hierarchy. So dropping on an item and inserting it before is not really an option. I currently have it such that when you dragover and right click you get a context menu that lets you insert before, but i'd like somehow to figure out when i'm inbetween two nodes. Anyone have any ideas.
Tanka
|
|
|
|
|
I am afraid the treectrl we know is not designed for rearrangement. What I would see is, when drag has begun, the treectrl folds and unfolds itself according to the mouse position, add space between items then show a xor drawn item (or set of items) to preview what the treectrl would look like with this item dropped here.
This requires work, but this would give you a lot of audience and attention...
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site. Support for development will ship at the same time as the Windows XP Service Pack 1 (SP1) release.
|
|
|
|
|
I'll do what I can. I'm looking for quite a bit more in a Tree control (ie multiple checkboxes) so I may have some fun later on. Thanks though
|
|
|
|
|
I have a function that takes a byte[], but the data i want to pass in is a string.
How do I convert?
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
|
i miss
byte* x = (byte*)p;
In the above list, I used
chars.CopyTo(bytes, 0)
and it bombed!!!
This should work.
Thanks
Thomas
modified 29-Aug-18 21:01pm.
|
|
|
|
|
string str = "This is a test";
byte[] byteArray = new byte[str.Length];
for (int i=0;i < str.Length;i++)
byteArray[i] = (byte) str[i]; This has to be the most asked question in this forum. It just doesn't seem quite worth writing an article for, does it?
Paul
|
|
|
|
|
as far as i remember string is unicode. thus each character consists of 2 bytes. your code may work for ascii-characters, but the real solution would rather be something like:
string str = "This is a test";
byte[] byteArray = new byte[<font color=red>2*</font>str.Length];
for (int i=0;i < str.Length;i++)
{
<font color=red>int c = (int)</font>str[i];
byteArray[<font color=red>2*</font>i] = (byte) c;
<font color=red>byteArray[2*i+1] = (byte)(c>>8);</font>
}
or something similar...haven' tried the above code...
looking at the system.text-namespace is the best i believe...
:wq
|
|
|
|
|
Interesting point. I suppose it depends what you want the byte array for. If it's to store in a database then you might want to compress it.
Incidentally, your code wouldn't work either (at least I don't think so). str[i] returns a char so the high-byte of your int would always be zero.
This is fine in most cases but you might as well say
byteArray[2*i] = (byte) str[i];
byteArray[2*i+1] = 0; However all this is fairly acedemic since it was pointed out that System.Text.Encoding.ToByteArray.GetBytes(str) seems to do the job perfectly.
Paul
|
|
|
|
|
Paul Riley wrote:
str[i] returns a char so the high-byte of your int would always be zero.
char is unicode friendly, so the high-byte will depend on whether the text is ascii or unicode.
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
It is? Gawd-damn! Amazing the things you can go around not knowing, isn't it?
Apologies to anyone I've misinformed on this one.
Paul
|
|
|
|
|
Look at System.Text.Encoding
|
|
|
|
|
Eric Gunnerson (msft) wrote:
Look at System.Text.Encoding
Well... that's a bit cool, ain't it?
Paul
|
|
|
|