|
almc wrote: m new to NT Services, and I haven't figured out how to debug services..
Debuging Services is not easy.. as they Run out of user account.. you have use old and Wise Debugging method like Logging, messagebox to determine flow of data!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi,
Can I use a single High-resolution Timer(multimedia) for multiple threads.If yes then Can anyone provide some tutorial link about that?
Best Regards.
Cyber Friend
|
|
|
|
|
Barring any further details, can you not just have the timer trigger an event or some other synchronization object, and let multiple threads act on that event being signaled?
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Cyber Friend wrote: Can I use a single High-resolution Timer(multimedia) for multiple threads.
Not sure what you mean by this. Callbacks from multimedia timers are run in a separate thread already.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
-- modified at 7:42 Wednesday 14th June, 2006
|
|
|
|
|
Hi,
Nemanja Trifunovic wrote: Not sure what you mean by this. Callbacks from multimedia timers are run in a separate thread already.
I have 4 threads in my application n each of them needs a timer for possibly different time interval. Can I use a single multimedia timer for them all. If yes then how?
Best regards.
Cyber Friend
-- modified at 8:22 Wednesday 14th June, 2006
|
|
|
|
|
Can't you just have each of the threads call SetTimer() ?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
DavidCrow wrote: Can't you just have each of the threads call SetTimer()?
Isn't it a problem that all threads call SetTimer() at the same time.This means if I have 30 threads then I have to create 30 timers at the same time. Is this good for my application to consume so much windows resources.Currently I m creating 4 threads but in future I have to create round about 30 threads, all having separate timer intervals.
Regards.
Cyber Friend
|
|
|
|
|
Cyber Friend wrote: Isn't it a problem that all threads call SetTimer() at the same time.
Technically, they won't be. Since Windows is not a RTOS, each call to SetTimer() would be synchronous.
Cyber Friend wrote: Is this good for my application to consume so much windows resources.
Probably not.
What exactly are you trying to do? Maybe an alternative solution can be found.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi DavidCrow,
First of all Thanks for your reply.
DavidCrow wrote: What exactly are you trying to do? Maybe an alternative solution can be found.
The scenario in my application is that:
I have four threads in my application, each of which is listening to a port on a telephony card for incoming calls.When answering a call the thread plays an audio file and if user doesn't press a digit then thread waits for some timer interval to replay that file again. The thread has to replay that file after timer interval expires. And this timer interval may be different for each thread as each thread is running a differt script for telephony flow.
Hopefully You have understood my problem.
Best Regards.
Cyber Friend
|
|
|
|
|
At least I think you can manage to set various events at each timer step that will help synchronize multiple threads.
Don't know if this helps, and don't have an example. Sorry.
|
|
|
|
|
Hi,
I have created a wizard using property pager in vc++ mfc. I used the following to add a header.
CWizSheet pex("New Property Sheet");
pex.m_psh.dwFlags |= PSH_WIZARD97;
Please can you tell me
1)How do I add a bitmap to the header?
2)A background color/bitmap to the rest of the page?
3)How do I add the text to the header?
I have found many tutorial explaining how to create a wizard using property pages, but they do not explain how to add a header, bitmap and text to the header. Please help.
Thanks.
Tara
Fortitudine Vinsinues!
|
|
|
|
|
hi all
I have MFC application and a public method
void CProject::Something(CButtonDerivedClass bButton)
{
}
When in OnInitDialog I call this method, I get error :
...
Something(m_bDerivedButton);
...
error : Error 1 error C2248: 'CObject::CObject' : cannot access private member declared in class 'CObject' c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h 1814
Please help if you can.
thanks
-- modified at 6:47 Wednesday 14th June, 2006
|
|
|
|
|
At a guess, it looks like the compiler can't make a copy of your class. So, can you pass it as a pointer or reference ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Am also think the same. Need to pass the pointer or reference to the function.
Please tel ur result.
yours faithfully
ajeeshcv
|
|
|
|
|
HI,
HOW TO HANDLE WM_DISPLAYCHANGE MESSAGE
|
|
|
|
|
either check for this message in the WindProc
or add the following entry in message map
ON_MESSAGE( WM_DISPLAYCHANGE, OnDisplayChanged )
now add a new function with name and proto
LRESULT OnDisplayChanged( WPARAM wParam, LPARAM lParam )
nave
|
|
|
|
|
|
|
Can you be more specific
whitesky
|
|
|
|
|
Your post doesn't describe itself clearly. What problem are you having?
My guess : Probably you are writing to invalid memory location.
or you are using an invalid pointer somewhere
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Use your debugger to locate te problem. Learn how to use it properly because it is much more helpfull than a forum.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Can't give you my 5 this time. Last time I was voted down for giving you a 5.
(This time I expect to be voted down just beacuse I didn't give you a 5).
|
|
|
|
|
|
i did it...
no matter the votes i get for that.
Cedric gave a true answer, he deserved it, so i give him the vote that expresses at best the value of his post
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
If you can accept to be voted down, so can I.
Cedric got my 5 as well.
|
|
|
|