|
Is it good programming, blocking of thread with event->Lock() instead of using
::WaitForSingleObject() function.
NSS
NSS
|
|
|
|
|
sthalasayanam wrote:
event->Lock()
Is a MFC way to force Thread in Waiting state and..
sthalasayanam wrote:
::WaitForSingleObject() function.
It Is win32 way to Force Wait for thread....
About good Programming practice.. it depends on company to company... as both are equally good.
"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
|
|
|
|
|
Well, the ::WaitForSingleObject API function is more versatile, in the sense that it accepts a variety of handles and works for all of them.
That said, if all you want is event based waiting, you might as well use CEvent and Lock.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thnaks for your answer.
NSS
|
|
|
|
|
The USB flash disk have no CHS parameters (the system use virtual parameters),I only need to get teh total sectors,how to do it? Thanks.
|
|
|
|
|
Anonymous wrote:
The USB flash disk have no CHS parameters (the system use virtual parameters),I only need to get teh total sectors,how to do it? Thanks.
Would calling GetDiskFreeSpace[^] and then computing TotalNumberOfClusters * SectorsPerCluster do the trick?
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Does that include the boot sector?
Me, wrong!?! Nah, you just need to change your thinking to make me right.
|
|
|
|
|
I want to get the total sectors for physical drive. The MBR and BOOT may be failure. so your function is invalid. Could tell me the other function? Thanks.
|
|
|
|
|
My brain's melting!
Can I use an XOR ROP on text? Erasing and re-drawing (moving) it like I'd do with a Rectangle or Ellipse and an R2_NOT ROP.
TIA, Simon.
|
|
|
|
|
I believe you need to draw it onto a bitmap first.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I want to use LAPACK's math library.
|
|
|
|
|
Is there any way to still purchase VS6? I have nothing against .net, I simply am used to VS6. I got a new PC and my VS6 CD no longer works. It would save me lots of time if I could just buy another copy of VS6. Thanks!
Me, wrong!?! Nah, you just need to change your thinking to make me right.
|
|
|
|
|
|
do you want a Copy of VC6 without license?
I can Send it for you.
you may only pay its post expense & 1$ for its CD.
Iman Ghasrfakhri
-- modified at 15:23 Monday 10th October, 2005
I'm ashamed For this suggest, I think you can yous this copy insted of your CD.
|
|
|
|
|
Ghasrfakhri wrote:
you may only pay its post expense & 1$ for its CD.
Watch Buddy .. Priacy on open Forum is not allowed...
"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
|
|
|
|
|
I appriecate the offer, but, I'm pretty sure that's not allowed. I'm gonna try copying the not working disc and burning it. Maybe the program will read where it's erroring and fix it.
Me, wrong!?! Nah, you just need to change your thinking to make me right.
|
|
|
|
|
|
I need to get the volume label (i need it for a removable device)
Does anyone know how can i do it???
Thanks!
|
|
|
|
|
Try GetDeviceInfo or another GetDevice* funciton.
|
|
|
|
|
Thanks...
But this API is not part of the visual C++ documentation.
I need a windows SDK API...
|
|
|
|
|
|
Thanks for the info... it's a big help...
I guess the volume label is not enough for me, i need also the name of the device - the one you see when you open my computer, right click on the device, click properties and click on the hardware tab (not general tab)
Do you know how can i get that name using windows API? Thanks!
|
|
|
|
|
Hi
I am relatively new to VC++ Programming.
Currently, I need to call DLL from VC++.
I have found a very good step by step from Hans Dietrich to do so
http://www.codeproject.com/dll/XDllPt1.asp
What are the additional steps I need to do if the Test.dll is not in the EXE's directory (step8)?
Assume the test.dll is in C:\DLLstore
|
|
|
|
|
swatch2468 wrote:
What are the additional steps I need to do if the Test.dll is not in the EXE's directory (step8)?
Assume the test.dll is in C:\DLLstore
If you are Linking Implicitly[^] to the DLL (as it's shown in the Hans Dietrich's tutorial[^] you cited), you'd need to either add "c:\DLLstore" to the PATH environment variable, or copy the DLL file to one of the predefined directories in which Windows will look for it. Take a look at the Search Path Used by Windows to Locate a DLL[^]
If you are Linking Explicitly[^] to the DLL, you can either a) use an absolute or relative path (e.g.: "C:\\DLLstore\\Test.dll") in the call to LoadLibrary[^], LoadLibraryEx[^], or AfxLoadLibrary[^] (if you are using MFC), or b) pass only the filename of the DLL (e.g., "Test.dll") to one of those functions, and again, either add "c:\DLLstore" to the PATH environment variable, or make sure the DLL is copied to one of the places where Windows will look for it.
--
jlr
http://jlamas.blogspot.com/[^]
-- modified at 22:50 Sunday 9th October, 2005
|
|
|
|
|
you should SET system variable PATH=C:\DLLstore.
|
|
|
|