|
As far as I know, this is something impossible on Windows. This is for security reasons: imagine you "lock" at the begining of your code but forget to "unlock". It would mean that your computer is completely frozen (only your app runs, but it can't get any input because they are not processed).
|
|
|
|
|
Yep, pretty much what I had in mind...
Thanks.
|
|
|
|
|
You can get close by temporarily elevate the thread priority to real time. But even then there's no guarantee.
|
|
|
|
|
That's what I ended up doing.
|
|
|
|
|
Read this somewhere that calling SetThreadPriority also resets the quantum of the thread.
So calling SetThreadPriority repeatedly can infact give exclusive control to the thread, at least in theory.
But I would never recommend elevating priority of a thread to real time.
Rather you should design your code in such a way that it handles re-entrancy.
|
|
|
|
|
That was interesting. I had a quick look around, but could only find information that this was a problem in Windows NT.
Regarding reentrant code, I don't think the OP's reason was thread safety. Just to prevent a task switch.
|
|
|
|
|
I suppose kernel code can. See, for instance [^].
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
[My articles]
|
|
|
|
|
nice but in kernel I prefer to use more orthodox stuff
My question was for something I am doing in user space.
|
|
|
|
|
Well, if it is tricky in kernel space...
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
[My articles]
|
|
|
|
|
can't be done in user mode, and that is how it has to be in order to protect one user/app from another user/app.
|
|
|
|
|
Luc Pattyn wrote: it has to be in order to protect one user/app from another user/app.
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
[My articles]
|
|
|
|
|
I saw this s/w once at a museum - and i wanna know if i can build something like it for a project that i need for college
It consists of: A screen, with a bunch of drums scattered around, and when you stand in front of the screen u are projected into it, and you can see yourself standing in the screen with drums all around you, and if you move your hand over a drum, a beat plays (like you've hit a drum for real) an when you hit another one, another drum beat plays..
now i really am fascinated by the idea of this, and want to use the same idea to build a project for myself. Only problem, i dont know where i should start.
So far what i have figured out is that i will need some way to scan the user and to track his movements and accordingly process the sound based on location of his hand..but how do i go about that i am not really sure. Also, what language will i use to build this, again, i am not sure. was thinking JAVA...
Any help would be appreciated!
Thanks
Rashmi
|
|
|
|
|
Rashmi Bachani wrote: i need for college
Rashmi Bachani wrote: Only problem, i dont know where i should start.
Honnestly, I think this is a project way to complex for a student (and even for a professional alone, this is also huge). My advise would be to select something much more simple than that.
|
|
|
|
|
Cedric, I agreed, it's indeed quite a lot of work:
- vision (assumed no markers on the body) with 2 calibrated cameras to reconstruct a depth image
- matching a virtual skeleton to the depth image
- detection of a hit of the skeleton on a virtual surface (you don't want to play a sound if the hand stays on the surface), including speed
- 3d rendering for graphics and video
I would recommend that you wait for Microsoft to include their Kinect API into XNA (if ever), at least you wouldn't have the first two components to develop (which require a serious background in vision theory).
Then, the 3d for graphics and audio should be a very relative problem...
Good luck, and have fun!
Regards,
Fabrice
|
|
|
|
|
Hi,
I want to know what kind of tool I need to render a formula in my program. I utilize Visual C++.
Thanks,
Claude
|
|
|
|
|
Gagnon Claude wrote: ...render a formula...
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Do you mean something like that[^] ? Unfortunately, this is in C# and I don't know something similar in C++. I just wanted to be sure that I understand your question.
|
|
|
|
|
No, I don't mean draw graphic.
I want to display math equation in my program the same way we can see with Math Editor in Word.
Bye,
Claude
|
|
|
|
|
|
Dear All,
I have subclassed SaveAs dialog box of microsoft office Applications(word, excel).
How can I get the full paths of the opened file and saved file(i.e the path of the file that I saved using save as option of the dialog box).
Any suggestions in this regard would be of great help
Thanks is advance
Dinakara K
Dinakara K
CAIR, Bangalore
|
|
|
|
|
|
This does not appear to be a C/C++/MFC question; perhaps you should try posting in one of the other forums.
It's time for a new signature.
|
|
|
|
|
It is C++ library in use with VS2008 question.
Pav
|
|
|
|
|
Pav1977 wrote: It is C++ library in use with VS2008 question.
Well apart from the fact that you have used C++ in the above comment I still see no related C++ question in your original post. Maybe you need to rephrase the question or show us the code you are having a problem with.
It's time for a new signature.
|
|
|
|
|
Pav1977 wrote: I can't add it to the library either? Anyone knows why and how to do this.
Any help will be much apprciated,
Where's the (specific) C/C++/MFC question?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|