|
Hi all,
I am quite aware of the working of the thread synchronisation objects like,
event,
mutex,
Critical Section,
semaphore...etc...
I know each of it's working individually, but can anybody let me know,
1)what is the advantage ,disadvantage over other..
2)when each of the one is best to use..
I had check out various sources to find this info...But I am not convinced nor it explains me only the concepts...
Thanks a lot,
Shiva P
|
|
|
|
|
|
mutexes are only visible to the whole machine when you have specified a name, correct me if i'm wrong.
|
|
|
|
|
If you don't name them you can't look them up by name in another process, but you can still use them in another process if the handle is passed there in some other fashion. Have a look at DuplicateHandle().
--
-Blake (com/bcdev/blake)
|
|
|
|
|
|
If the sync is only for the current process then use critical-section since it's faster than mutex.
in Mutex you will always have context switch to kernel mode , whereas in critical section you stay in user mode when there is no contention.
|
|
|
|
|
how can i add tooltips to various controls in my MFC dialog based application?
rIsHaBh
|
|
|
|
|
Type 'using CToolTipCtrl' in MSDN and you will get step by step instructions.
« Superman »
|
|
|
|
|
|
I have read some articles,
knowing some infomation such as
1.Setting the time to 23:59:59 on the 29th or 30th day of a month that has less than 31 days may cause the clock to roll over incorrectly with some chipsets(What is the reason?)
2.y2k problem
and so on
Can you tell me
1.whether there exist some other situations like these problems, and what are they?
2.Should I access to the cmos RTC date or the OS date to test the date's validation?
3.How to chang and update the CMOS RTC time/ System Time
|
|
|
|
|
Hi ,
how can i get the IP adresses and machine names of other computers in my local network ?
I come from china ,so my english is very poor ?
Thank you very much !
|
|
|
|
|
Look for WNetOpenEnum() and WNetEnumResource() .
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
just check the following url
http://www.codeproject.com/internet/ipaddress.asp?target=gethostname
or check out msdn at
Platform SDK: Windows Networking
Enumerating Network Resources
adi
|
|
|
|
|
|
Thanks a lot ,my close foreign friends!
|
|
|
|
|
hello
one simple question.
How to insert one frame window into one SDI project?
"They can because they think they can" - Voltaire
|
|
|
|
|
When I capture screen with PrintScreen then paste it in Paint.exe.........the cursor always disappear......
How can I capture include Cursor?
Is there a code to do this ?
thank
|
|
|
|
|
You know, I have been wondering the same thing for years. I know pressing ALT+Print Screen will only copy an image of the active window. I wonder if there is some other key combination that would do it?
BNEACETP
|
|
|
|
|
The cursor cannot be directly captured along with the screen, mainly due to all sorts of nifty hardware-side optimizations. This is also the reason why some apps that use hardware overlay surfaces (such as video players) cannot be captured (this may not be true for all video cards, however).
Some screen capture programs fake capturing the cursor by compositing an arrow cursor at the cursor location after the root window is grabbed. I suppose a smart capture program could look up what the current cursor scheme is, shadow options, etc., then use that for compositing.
- Mike
|
|
|
|
|
I have a video player appl. It runs in full screen mode on some machines but not on others.Is this a video card problem? I know my doubt is a bit offtrack from the original question raised.But i would be glad if u could throw some more light on this.
Thanx,
|
|
|
|
|
See here:
http://flounder.com/printbitmap.htm
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Can you help me or show me where have source code to do this
I want read/write BMP,JPG,GIF file
more detail:
I will capture all screen .....after then save it in BMP,JPG,GIF format
thank you very much
|
|
|
|
|
|
Chris,
I'm using your JpegFile[^] class - excellent! - and have recently been forced to stretch blit HBITMAP s created from Jpeg files. However, this results in skewed images. Plain blitting works fine, but since stretching skewes the image, I wonder if there might be data alignment issues.
I create the HBITMAP like this (only a snippet - allocated memory is deleted, I promise...):
UINT width, height;
LPBYTE pData = JpegFile::JpegFileToRGB(filename, &width, &height);
JpegFile::BGRFromRGB(pData, width, height);
UINT widthBytes;
LPBYTE pDataAligned = JpegFile::MakeDwordAlignedBuf(pData, width, height, &widthBytes);
HBITMAP hBmp = ::CreateBitmap(width, height, 1, 24, (PVOID)pDataAligned); Should I create a DIB section instead? If so, why?
Can you see something else, which is completely and utterly crazy?
Thanks for any input!
--
Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so. (Douglas Adams)
|
|
|
|
|
the docs for CreateBitmap say that the image has to be WORD-aligned, not DWORD-aligned. so, that could be a problem.
i typically use CreateDIBitmap or CreateDIBSection. have you tried either of those?
-c
ImgSource | CheeseWeasle
|
|
|
|