|
Anonymous wrote:
Is there any particular reason why to use it instead of SYSTEMTIME or CTime?
A CTime object is only good from January 1970 through January 2038. A COleDateTime object covers that range and a lot more.
Anonymous wrote:
Looking at it I may also use COleDateTimeSpan to store the time between checks.
What's to store? If you are wanting to know the elapsed time since the last check, you'd be comparing the last-checked time against the current time.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
DavidCrow wrote:
What's to store? If you are wanting to know the elapsed time since the last check, you'd be comparing the last-checked time against the current time.
I also need to store a timespan I think. This is so I can store an amount of time like 30 days. I can then decide if an update must be done by looking at the last time an update happened then adding the timespan which is the length of time between updates and then comparing with the current time.
It will be like looking for web updates every 5 10 or 30 days depending on a user setting.
|
|
|
|
|
Hi !
I'm trying to develop an hyperterminal-like application in VC++.
I use a CEdit control for logging data coming from a serial com port.
The problem is that I didn't find a good way to add text in the CEdit control.
This works too slow, and gives flickering effects.
Any advise will be welcome !
Thanks in advance.
Jeje.
|
|
|
|
|
Jeje wrote:
The problem is that I didn't find a good way to add text in the CEdit control.
What way(s) did you find that was not good?
Have you looked at ReplaceSel() ?
Yoiu could also add the incoming data to a CString object and then call SetWindowText() once.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello,
I de-installed visual studio.NET. Recently I found out that the de-installer didn't remove the JIT debugger regestry settings from my system.
Now, when a program crashes, the debug dialog appeart and asks me if I want to debug the application. When I hit the retry button (to debug), I get this really annoying message box that says that the JIT debugger canno't be found. It also asks if I want to use the old debugger msdev.exe
After sweeping the geristry manually and removing every VS.NET and JIT entry I could find, the dialog still appears.
Does anyone know how I can solve the problem?
Thanks
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
I solved the problem!
I just don't know why I didn't think of enabling the Just In Time debugger from VS 6.0
On the other hand, my registry is clean(er) than it was before
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Did you check this one?
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Aedebug
In "Debugger" String i have:
"C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\msdev.exe" -p %ld -e %ld
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I have the same key, but there was another key: "PreVisualStudio7Debugger". Now I have removed the key..
You never know how much garbage an uninstaller leaves around...
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
it is interested at windows system registery. You must clean this from windows system registery.
|
|
|
|
|
Hi,
Is there a method to replace a message to the top of the application message que.
Thanks and best regards.
Erkan Ermis
|
|
|
|
|
Hello,
I don't think that there is a function to replace a message to the top of the message qeue. But you can use SendMessage for immediate processing (the message won't be placed in the message qeue)
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
I use client/server application,that's wrote in c++.I would like to show all connected clients to server in windows system monitor.Can someone help me?Thankx
reply to this message
|
|
|
|
|
Check out NetUserEnum() , NetSessionEnum() , and NetWkstaUserEnum() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
but it's thread application and the server was with COM technologie developed.
I use one variable iClientsCount it means how much connected clients and i would
like the show this variable in system monitor.
RRfun
|
|
|
|
|
So iterate through each connection and increment iClientsCount . Or, you could look at the fifth parameter which receives the count of items actually iterated. What's wrong with that?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello all,
While building my vc++ project i am getting error:
Cannot start tool.
Error spawning 'vcspawn.exe'. The build could not be performed.
I have set the environment variable.
could you please suggest some solution.
Regards,
JP
|
|
|
|
|
Can you see the requested binary in your bin folder?
(VS6.0 C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin)
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Yes vcspawn.exe is there in the bin folder.
Regards,
JP
|
|
|
|
|
Do you have that path in the PATH enviroment variable?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hello,
Thanks for suggestions.
I have set the environment variable in like:
name = VSCOMNTOOLS
path = C:\program files\Microsoft Visual Studio\common\MSDev98\bin
Regards,
Jokhan
|
|
|
|
|
Please bear with me on this post, I have never coded anything in any form of C++ but my boss has given me the task of putting something together that for various reasons requires a C++ application.
The Setup
I have a C# application that launches a background process, this process has to be coded in C++. Fom time to time the C# application will need to close the background process, for various reasons I cannot do a dirty shutdown (i.e. just kill the process). So I am looking for a way of getting the C# app to make the C++ application shutdown cleanly (i.e. process some code before existing).
After doing a far bit of reading I have come across something called CEvent which I understand as being an event that can be fired by external process and caught with the C++ application.
The problem is that although I can easily hold my own in C# I havent got a clue when it comes to C++ so can anybody firstly tell me if I am on the right track, and if so can you point me in the direction of some basic tutorials.
Thanks in advance
post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|
|
The CMutex sync object works among process. I can be helpfull.
|
|
|
|
|
The sun rises with the speed of a cunning fox
post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|
|
Here are some, but not all, options:
You first need to determine how the other program will be able to respond to the request to shutdown.
1. Event: If you want to watch for an event, then you must have a WaitForSingleObject, WaitForMultipleObjects, etc. call in your C++ program. You can code in a periodic check where you can try to wait for the object for a very brief time, like 50 milliseconds or less. If it is already signaled, then you can exit the C++ program, if you get TIMEOUT, then the event was not already signaled by the C# program.
2. You might also be able to use PostThreadMessage if you had some way to determine what the main thread identifier of the C++ progrma was, then you could watch for a registered window message in the C++ progrma and terminate, or else some other message of your choosing, use the MsgWaitForMultipleObjects to get the message.
3. If the C++ program has a window and you can determine the window handle, you can then just post a WM_CLOSE to the C++ program's main window.
4. If the C++ program has a window and you can NOT determine the window handle, you can always try a SendMessage with a registered window message that the C++ program is watching for.
|
|
|
|
|
Thanks for the reply.
After much reading, I have opted to create an event and then sit on WaitForSingleObject(...) this works something like this :
...
HANDLE hEvent = CreateEvent(NULL, true, false, "EventEngine 10062004-MICRG-4546-9DD2-F0868C319D02");
ResetEvent(hEvent);
WaitForSingleObject(hEvent, INFINITE);
...
I think this will work so all I need to work out now is how to get C# to set the event, fortunately this is more comfortable ground for me
Why o why cant I start my C++ jaunt with a nice and simple Hello World application
post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|