|
jrahma wrote:
How can understand what is the meaning of it? any good reasource?
Write better code!
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++!
|
|
|
|
|
OK, I have been play with this on and off all day and can not make it work.
How do I define an instance of of a performance counter at runtime?
I have the counter defined in the server explorer and can use the counter it's self, but I wish to add intances of the counter, in the same way as, for example, 'Processor/% Idle Time' has.
Anyone any ideas?
Thanks
Stephen
|
|
|
|
|
Drag it from the Server Explorer onto your form. That will give you a control to work with.
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
|
|
|
|
|
I can get a normal performance counter to work no problem, what I cant get to work is the InstanceName property.
If I try to access one of the existing performance counters that has multible instances that works, but I can not create my own.
Bassically I have this system that can load plug-in modules at run time. I have a custom counter called 'Messages Dispatched' now under that I want to create an instance for each plugin i.e. 'E-Mail', 'SMS' etc, just like under PRocessors you can see an instance of each processor.
The documentation said to pass the instance name in the constructor to ProcessCount but that does not work for me. The app starts and perfmon shows no instances, just the root performance count.
Thanks
Stephen.
|
|
|
|
|
|
Yeah but that shows how to use it from C#. Not how to implement it in C#.
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
|
|
|
|
|
|
Not quite true. C# supports the params keyword, which allows an object[] of user-defined size to be passed as a method parameter. This could be used to implement optional args in a sense.
Bill F
|
|
|
|
|
|
bfarley wrote:
in a sense
Those are the key words right there.... Instead of writing a normal method and specifying default values you have to go through the array and find out which parameters go where, and lord help you if you have two parameters of the same type but only one is in the array
There are times where I like not having optional parameters because it makes the user of that code think before just accepting the defaults; other times its a real PITA.
James
"And we are all men; apart from the females." - Colin Davies
|
|
|
|
|
Hey, I didn't say it was perfect - just that it could be done.
Bill F
|
|
|
|
|
I Need a macro to collapse .NET Solution Explorer Tree. Does any one know how to do that, or have code that will do that?
Thanks,
Derek
|
|
|
|
|
Just in how many places are you going to ask this?
|
|
|
|
|
|
It is hard to release a dll at runtime.
Any body know the solution?
my question at:
http://www.codeproject.com/script/comments/forums.asp?msg=281721&forumid=1649#xx281721xx
lost my way
|
|
|
|
|
You can't release an individual dll, you can only release a whole appdomain.
See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp05162002.asp
for more information
|
|
|
|
|
thanks.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp05162002.asp
and
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp03122002.asp
helped me.
Reflection is a very powerful namespace,but hard to use.
lost my way
|
|
|
|
|
GREAT! So when can we expect an article? I would love to see some more examples.
|
|
|
|
|
just see the two articles by Eric,and it is clear enough.
lost my way
|
|
|
|
|
|
i want to execute that line
SetWindowsHookEx(WH_JOURNALRECORD, JournalRecorderFunc,AfxGetInstanceHandle(), 0);
in csharp.
I know that SetWindowsHookEx is defiend in "user32".but the problem herer is that
I don't know where AfxGetInstanceHandle() is defiend so that i can use ijw or
pinvoke to solve my problem.
if i use it in csharp may i have to Initialized the MFC or not if yes please tell
how will i Initialized it.
how will i Initialized MFC IN MANAGED CODE?
how to use mfc dll in c# and how to access class and function in it?
related link if u could provide?
r00d0034@yahoo.com
|
|
|
|
|
imran_rafique wrote:
how will i Initialized MFC IN MANAGED CODE?
No no no no no!!
Don't even think about it!
imran_rafique wrote:
I don't know where AfxGetInstanceHandle()
Marshal.GetHINSTANCE(...)
But I don't know how to use it!
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++!
|
|
|
|
|
I would like ot install on my computer (128RAM, 450MHz) Windows 2000, because I hope I'll get a better performance with VS .NET, than I get under WIndowsXP. (I do not plan an upgrade until January '03)
Do I make a right guess??
Here my prob is how to install Windows 2000 without do destroy WinXP? Any ideas are appreciated!
Thank you!
|
|
|
|
|
Shaggi wrote:
I would like ot install on my computer (128RAM, 450MHz) Windows 2000, because I hope I'll get a better performance with VS .NET, than I get under WIndowsXP. (I do not plan an upgrade until January '03)
Do I make a right guess??
Yes, because Windows XP will eat a larger part of that 128Mb RAM than Win2K will, but I'm not sure you'll get quite the benefit you're hoping for.
Shaggi wrote:
Here my prob is how to install Windows 2000 without do destroy WinXP? Any ideas are appreciated!
You need a completely spare partition, usually the primary partition of a secondary drive (not even sure if it's possible otherwise). Reboot from the CD and follow the instructions, being very careful not to format or install on the wrong drive. You should end up with a machine that asks you on startup which version of Windows you want to load.
Just as a bit of free advice - don't try to hook the software from XP into 2K, it's much safer to have two copies of everything.
Dual boot machines, as you may have guessed by now, can be very heavy on disk space; you might find it a lot cheaper just to buy a couple of 256Mb RAM chips. RAM is surprisingly cheap nowadays.
Paul
|
|
|
|
|
thanks to you and leppie
I have too much free space on my HDD, so its going to be cheaper than another peace of RAM I also would like to be able to use Win2000 too, so installing Win2000 isn't that bad.
BTW. What about if I want to install win from HDD (I remember the first time when I did it from the CD, it took me about 2hrs Should this make a difference?
|
|
|
|