That all might be true but he asked how keepalive works (and correct me if i am wrong in what i answered to that), not how he should design his client/server protocol.
I agree that instead of relying on keepalive he should implement his own mechanism for detecting if the other side is gone because that would give him a much better control over the whole thing, but of course, that's just my oppinion. To detect if a long-silent connection is silent because the other side doesn't have anything to say OR because someone poured some coffee over the router would require -as far as i know- some kind of "pinging" and "timeouting", and keepalive does exactly that, so the aproach isn't fundamentally flawed.
For the "shortening of the 2 hours thing", as i understood you can set the timings for sockets individually, i meant that, not fiddlign with the system-wide settings.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> //TODO: Implement signature here<
No one wants to know if a connection is alive. What they want to know is whether the business logic is still functioning. And the only way to do that is to implement something that actually tests the functionality. The more fully it tests it the better. But at a minimum you can assure that the server is at least still responding to a message enough to return a response.
A simple implementation is to send a do nothing request from the client at a configured interval if no other request has been sent in that period.
And do NOT rely on such functionality to get around error checking legitimate requests. A server can go down right in the middle of a legitimate request.
No. You can't have application specific themes. If you need that sort of functionality, look at custom UI frameworks. The recent versions of MFC have skinned controls, which offer different visual styles (Office 2007, VS2008 etc.) Also third party MFC control vendors like BCGSoft or Codejock offer a lot of skinnable controls.
Yes, you'd have to set the erase background flag to true in the call and call UpdateWindow() to force an immediate paint. That worked on older OSs but on Windows 7 the updates don't happen while you have the mouse button pressed it seems. It does work on the LBUTTONUP message (just tested it).
You may have to double buffer - grab the image for the rect from the screen, draw your rectangle, draw the captured image back to the screen to erase, etc.
I have written an application in c# that has a reference to a dll written in c++. I can run the application in debug mode and it works great, but after I build the application, it will not start and gives me the following error, any thoughts on how to resolve this?
I have seen that error when you mix 64 and 32 bit platforms. The application and the dll need to agree on their "bitness". Check your build parameters for C# to see the platform selected. If it says "Any", that means that, at runtime, it will pick the architecture best for the machine you are running on. If the dll doesn't match that, you will get this error.
Sorry, I don't use Visual Studio Express. In Visual Studio 1008 Enterprise it's in the Project Properties, Build tab, Platform Target field. There's a setting for both Debug and for Release. Sorry I can't post a screenshot of the relevant screen.
I'm experimenting with D and I'm trying to make a resource manager much like the C# one.
Now I'm hitting a problem...
How do I know the current user locale? i.e. "en-Au" / "en" ?
I found this function: GetUserDefaultLocaleName
but apparently it's only post vista... what if my program run on XP? what should I do? (I'm trying to write an installer, so I'd like to cater, at least from XP tp 7!)
I found this one too: GetUserDefaultLCID() but what am I to do with a LCID?
Is there a referenc etable I can use?
[EDIT]I just found a big table with the exhaustive list of locale...
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
My programs never have bugs, they just develop random features.
modified on Thursday, June 2, 2011 12:29 PM
Last Visit: 31-Dec-99 18:00 Last Update: 10-Aug-22 19:59