|
CPallini wrote: BTW do you really need MFC?
[Visual C++ 2008 Feature Pack Release^] updates MFC with cool look and feel feature like Office 2007, Office 2003 and Office XP look and feel. Its really going to rock.
|
|
|
|
|
Real men don't need those fancy things.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
True, actually i thought to add those in my previous post.
Anyway that is good news for MFC developers that first thing is development is going on MFC and next thing is good news for those who are trying to implement those cool stuffs with their own efforts. And I feel more convenient with VS 2005 IDE than VS 6.0 IDE.
|
|
|
|
|
Can you more about your project maybe you dont need to use of MFC.
|
|
|
|
|
Hi..
I am running thread..I want to end the thread after 1 minutes..
i am getting the Current time..
i am taking the given time
End Time = Current Time + Given time..
Now i want to end thread after 1 minutes.
plz help me
thank you
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
And what is your doubt about? Cannot the thread routine itself monitor such a time interval?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
hi..
First i am getting the current time
Example Current Time = 03.00pm
Given time 1 minute.
End Time = 03.01 pm
thread should exit after 03.01pm
but when i comparing CurrTime = EndTime.
The current time is showing 03.00pm
but after 1 minute the current time should be 03.01pm
i cant compare
help me
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
manju#123 wrote: First i am getting the current time
Example Current Time = 03.00pm
Given time 1 minute.
End Time = 03.01 pm
thread should exit after 03.01pm
but when i comparing CurrTime = EndTime.
The current time is showing 03.00pm
but after 1 minute the current time should be 03.01pm
i cant compare
help me
(Post) code, please.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
It was the algoritm can you make a code for it?
|
|
|
|
|
Since it is (by OP's admission) a buggy algorithm, hence yes, I can implement it.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi..
here code.
////////////////////////
cDuration = _ttoi(linfo->sDuration);
StartTime = COleDateTime::GetCurrentTime();
CurrTime = COleDateTime::GetCurrentTime();
CurTime.Format("%02d:%02d:%02d",CurrTime.GetHour(),CurrTime.GetMinute(),CurrTime.GetSecond());
COleDateTimeSpan ts(0,0,cDuration,0);
EndTime = StartTime + ts;
StTime.Format("%02d:%02d:%02d",EndTime.GetHour(),EndTime.GetMinute(),EndTime.GetSecond());
if(linfo->bServerConnected==false)
{
if(CurTime <= StTime)
{
linfo->btimeOut = false;
}
else
linfo->btimeOut = true;
if(CurTime <= StTime)
while(linfo->btimeOut == false)
{
run the thread
if(CurTime == StTime)
{
linfo->btimeOut = true;
ExitThread(dwExitCode);
_endthread();
}
}
//////////////////////////////////////////////////////
thank you
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
What a mess!
(1) use <pre> tags to surround code snippets.
(2) You should never use ExitThread.
(3) What is the purpose of _endthread()
(4) What is the purpose of the following lines?
CurTime.Format("%02d:%02d:%02d",CurrTime.GetHour(),CurrTime.GetMinute(),CurrTime.GetSecond());
StTime.Format("%02d:%02d:%02d",EndTime.GetHour(),EndTime.GetMinute(),EndTime.GetSecond());
(BTW how are CurTime , StTime declared?)
(5) A far a I can see CurTime is never updated.
(6) Probably an equality test on times is not appropriate (maybe better >= ).
IMHO we're a bit far from the target.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi..
what should i do so that..
current time is updated...
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
manju#123 wrote: current time is updated...
That means it is updated inside the thread routine. Could you please post that code (maybe the variable declaration will be helpful too)?
manju#123 wrote: what should i do so that..
Well, code needs a bit refactoring I suppose. We could help.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
here code.
////////////////////////
COleDateTime StartTime,CurrTime;
COleDateTime EndTime;
CString StTime,CurTime;
cDuration = _ttoi(linfo->sDuration);
StartTime = COleDateTime::GetCurrentTime();
CurrTime = COleDateTime::GetCurrentTime();
CurTime.Format("%02d:%02d:%02d",CurrTime.GetHour(),CurrTime.GetMinute(),CurrTime.GetSecond());
COleDateTimeSpan ts(0,0,cDuration,0);
EndTime = StartTime + ts;
StTime.Format("%02d:%02d:%02d",EndTime.GetHour(),EndTime.GetMinute(),EndTime.GetSecond());
if(linfo->bServerConnected==false)
{
if(CurTime <= StTime)
{
linfo->btimeOut = false;
}
else
linfo->btimeOut = true;
if(CurTime <= StTime)
while(linfo->btimeOut == false)
{
run the thread
if(CurTime == StTime)
{
linfo->btimeOut = true;
ExitThread(dwExitCode);
_endthread();
}
}
//////////////////////////////////////////////////////
thank you
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
OMG, You're comparing strings!
Anyway, I don't see any thread routine in your post.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi,
can any body help me how to detect mic location i.e Microphone, Rear mic or any more supported in Sound card in windows XP using mixer APIs.
Pavan
pavan
|
|
|
|
|
Can you more explain,what do you need exactly?
|
|
|
|
|
Dear Friends,
i m working on an VC++ application and using oracle as a backend. Through my application i m writing some data to Oracle database. After certain number of iterations i m getting Commit error (8197). Can anybody help me with this? What might be the reason for the same.
|
|
|
|
|
have you googled for that error number ?
also, have you checked Oracle documentation ?
because this is a VC++ forum, we are not Oracle experts.
|
|
|
|
|
I have tried on Google it is mentioned as it commit error and nothing in detail.. I have asked this question on VC++ forum because i wanted to know if somebody who have worked on VC++ and Oracle in combination may know the reason........
Thank u so much
|
|
|
|
|
Hi there,
You will have a better chance of getting an useful answer to this question at the Database[^] forum.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hello experts,
I have a project that drive me crazy. I would appreciate if any bony can help/guide me
I have 2 computers both running XP Pro SP2 called PC-A and PC-B.
PC-A is an embedded computer. It has an application to do some specific task. Right now, I have to run it manually and save the results for my other tasks. I do have source for this application.
I have another application on computer PC-B. This application is relying on the results from PC-A which right now I have to enter manually.
These 2 computers are connected via ethernet cable. I do have source for this application as well
I would like to modify the application on PC-B to tell PC-A to run its application and return results to PC-B so PC-B can perform its task automatically.
I don't know where to start.
Please help me out with some direction/links. Example would be perfect
Thanks in advance
|
|
|
|
|
install PsService[^] on the calling machine, then use it like this :
psservice \\192.168.0.15 -u the_user -p the_pwd start the_service
|
|
|
|
|
toxcct wrote: psservice \\192.168.0.15 -u the_user -p the_pwd start the_service
How would the data pass back to the calling machine (PC-B)?
|
|
|
|