|
I don't know if there is some FCL wrapper for it, but in C++, you use CoCreateInstance to get a handle to the task scheduler object, CLSID_CTaskScheduler. Given that, you can call Enum() to enumerate the scheduled tasks. Look up documentation on ITaskScheduler.
|
|
|
|
|
Any idea on how to operator overload in C#.Net?
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
maybe this article helps:
http://msdn.microsoft.com/library/en-us/cssample/html/vcsamOperatorOverloadingSample.asp
|
|
|
|
|
I typed 'operator overload in C#' into google and got a ton of references.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
"Abstract classes can add more functionality without destroying the child classes that were using the old version. In an interface, creation of additional functions will have an effect on its child classes, due to the necessary implementation of interface methods to classes."
CAN ANY ONE EXPLAIN THIS WITH AN EXAMPLE? WHEN WE ARE IMPLEMENTING ABSTRACT CLASSES, HOW COME THE CHANGE TAKES PLACE IN ALL THE DERIVED CLASSES WHICH IMPLEMENT ABSTRACT CLASS WHEN WE MAKE A CHANGE IN ABSTRACT CLASS?
KUMAR
|
|
|
|
|
The point of any class heirarchy is that every class inherits the behaviour of all classes it is derived from. Otherwise, there'd be no point in an OO heirarchy.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Please don't yell. People are trying to work around here!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can someone please help me out and advise me which is the best application type to use for writing a CBT?? Should I use WindowsForms, Win32 or MFC?
I'm writing a desktop application which has multiple choice questions, drag and drop, hot spot etc. I'm stuck at which application type I should use.
Also if anyone can suggest any sites or books that would be of help to me, please do so
Thanks!!
Darktaz
|
|
|
|
|
I think you want the C++ forum. In C#, your only option is Windows Forms. In C++, I'd say go with MFC. Win32 is interesting, if you like doing stuff the hard way. managed C++ is really not that great an option, IMOI, although I'd regard WinForms/C# to be the easiest way forward, overall.
The best site is www.codeproject.com, they have heaps of articles and message boards where you can ask questions if you get stuck
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I'm making a networking program that involves one server and multiple clients. I need to stream data out to all these clients preferable at a rate of 30 times/second.
The problem is, is that the packets bundle. I need these messages to get to the clients seperately. However, when my BeginReceive callback is called, there are multiple messages in the buffer. I turned on the noDelay flag and that didn't help.
Also, I think the messages get backed up in a queue. When I first start sending the messages at 30 per second, the client will receive about 7 at a time. After a few minutes it is receiving up to 60 messages per callback!
Anyone have any ideas?
And if you know the answers to any of these questions please help:
1) When I call beginsend. Do I need to wait until endsend is called before I send my next message?
2) TCP\IP should have virtually no delay on a network right?
3) will my beginreceive callback ever be called with a fraction of a packet? For instance will I ever get half of a packet on one call and the other half on the next?
Thanks for any help
Joe Scheinberg
|
|
|
|
|
hii,
about your quetions
1- ofcourse you must wait till endsend and you must call endsend method in beginsend callback function to ensure send is done Successfully. if send faild you will recieve exception from endsend
2-nodelay don't help the much you think. if you looking for nodelay to ip packets you have to wait till we work with ip version6 whitch you set priorty level to your packets. becouse the real delay your packets face is on network specially if it was internet which suffers from congestion. if you work on lan transmission speed much much better
3-about your problem there are many resaons that leads to it, i'll list some of them
a-your system design, sequence of send and recieve messages (Messages cycle) is logically incorrect
b-there is a fact you must keep in mind when working with tcp protocol; that one of tcp problems is that it is not keep message boundry. when you work with it you just write your data on stream if for example you write 4 kb message.it will be segmented to two ip packets and sent. in destaination you wait for one recieve so you will recieve your message as half of original message, second message you recieve is the second half of original message and so on your all messages will be overlaped. to overcome this one way is to send the size of message before message and on destination read size first and never let the stream buffer till you read all bytes according to size. this will help to keep message boundry
c- if you find problems in working with callbacks why don't you work with blocking socktes (synchronize) and put them in threads that would be much simple and easy to mainpulate.
marcoryos
|
|
|
|
|
how are you collegues in net i am really in dangerous and seriously problem alright i just want to retrieve the instant webcam stream into the corresponding images to transform it through the network any body knows how
by the way i had succeeded to take vedio by directx but i need how to implement that option please refer to me exactly as possible
Miss With The Best And Die Like The Rest
|
|
|
|
|
snouto wrote:
how are you collegues in net i am really in dangerous and seriously problem alright i just want to retrieve the instant webcam stream into the corresponding images to transform it through the network any body knows how
The full stop is on the bottom right of the keyboard, just two to the left of the shift key.
snouto wrote:
Miss With The Best And Die Like The Rest
ROTFL - you mis-spelled your sig block ? Or do you really mean miss and not mess ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
snouto wrote:
i am really in dangerous and seriously problem
First, extricate yourself from your "dangerous" situation, then call us back. It's probably not a good idea to discuss coding issues while you're fighting for your life.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can I serialize a class derived from TreeNode ? It seems that somebody did a big mistake when creating this (ond other similar) class(es). It is serializable and has GetObjectData() and suitable constrauctor (taking SerializationInfo and StreamingContext arguments), but they're both declared as private. When I made my custom class deriving from TreeNode and having only one additional data member, and tried to serialize it, without explicitly defining above mentioned functions, an exception was thrown that a constructor for deserializing couldn't be found. But on the other hand, I can't make use of already defined (in base class TreeNode ) functions, because they're private! So what can I do? Write all this serialization from scratch on my own??? It's insane... Help me!:->
|
|
|
|
|
Is my question really so stupid ? Or is it just rethoric (i.e. without answer?);P
|
|
|
|
|
I am working on a graphics intensive project and need some input related to graphics benchmarks. Basically I have an underlying data source that can change multiple times per second. This change is then displayed as close to real-time as possible through a gui (bars, charts, gauges, etc). On one hand, most of the gui widgets exist in the form of user controls that can easily be dropped onto a windows form. On the other hand the data changes so rapidly, would it be more efficient to custom draw all pieces of the data in one image via System.Drawing or DirectX so that in essence only one Paint event was firing at each change.
The second would be more code intensive but is there somewhere that may show what efficiencies this approach could have? Are there any other ways to handle refreshing graphics for rapidly changing data values?
Thanks in advance.
gkotrick
|
|
|
|
|
If your data is changing that often, do you really need to refresh every time ? How much will your users suffer if the update is 1 1/2 seconds out of date ( refresh every two seconds ) ?
As for your question, drawing everything onto one internal bitmap that you then draw to the screen is definately going to be a lot more efficient. Personally, I'd lean towards writing it so that at a given interval, it redraws the entire image, THEN invalidates the screen so it is redrawn. Then it will draw as often as it is able to (note this will max out your processor, because you're asking it to go as fast as it physically can - this also means you need to use a threaded model so that your UI remains responsive ), assuming this is less often than the data is refreshed.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Thanks for the reply. Yes this will be a threaded model and refreshing every 2 seconds will work depending on the type of widget being painted. For example a strip chart would show the entire data series but a level bar would only show the most recent. I guess I'm looking for a balance (or breaking point) between end user experience and system resource. I certainly do not want to cause a meltdown on someones CPU but at the same time I do not want data being missed because it was not displayed.
gkotrick
|
|
|
|
|
Why don't you cache values, and then display them all every two seconds ? Surely if you only show the most recent value and it's changed more than once in two seconds, that data is insignificant ?
Anyhow, that's what I would do, every two seconds make a copy of the data ( so you can keep collecting at the same time, but your data is an accurate 'snapshot' of a moment in time ) and then drawn to a bitmap, which is drawn to the screen in one go.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I did some searching and found someone that used IE's cache to do this cause the axweb thing supposedly saves there.
But i dont like that approach...any way to extract them from maybe the Document property?
|
|
|
|
|
You can get the images of the document you're on, sure, look at document.images collection.
If you want to get the list of images previously previewed in IE in the past, the only way AFAIK to do this would be to search through the IE cache.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: He has a funny face. And he's my son.
Judah Himango
|
|
|
|
|
I tried that way...but that property isn't like a regular collection that i can iterate through. It expects me to know the name and index of where the image is in collection, unless i'm mistaken.
|
|
|
|
|
I need to shutdown explorer programmatically. I had to do this once in a C++ project and I used the following code:
HWND hwndShell = NULL;
hwndShell = FindWindow("Progman", NULL); // Locate the Windows shell
if(hwndShell != NULL)
{
PostMessage(hwndShell, WM_QUIT, 0, 0L)// Tell the Windows shell to quit
}
Any ideas on how to do this in C#?
Thanks!
Ian
|
|
|
|
|
You can do this using the System.Diagnostics namespace. The following code will kill explorer.exe:
Process[] RunningProcesses = Process.GetProcessesByName("explorer");
Process proc = new Process();
foreach(Process p in RunningProcesses)
{
if(p.ProcessName == "explorer")
{
proc = p;
break;
}
}
proc.Kill();
When I tested it however explorer.exe restarted a few seconds after it was killed. This might be due to some program I had running, but I'm not sure.
|
|
|
|