* This code is by OShah. all code will have the following licence.
* Copyright Shexec32. All code bears the following licence:
* Copyright Shexec32 2004-2005. All rights reserved.
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
#pragma warning (pop)
/** Although the 3rd party code cannot compile with such aggressive
* warnings, it doesn't give us an excuse to disable warnings.
* Therefore, reenable all warnings (disabled from disable_errors.h)...
* except the following:
#pragma warning (disable:6309)
/** argument is null; does not adhere to function specification.
* These warnings typically occur when we call GetNamedSecurityInfo(),
* which expect NULL pointers to be passed in. The docs for
* GetNamedSecurityInfo() explicitly statethat passing NULLs is OK.
* As you should know by now, if the docs say it, it must be right (if
* it isn't, Windows gets hacked so it is right).
#pragma warning (disable:6014)
/** Code may leak memory.
* These warnings occur in the QueryInterface() functions. Now, it
* certainly looks like we'd leak memory in QueryInterface(), but due
* to one of the pecularities in COM (they call it feature), we
* don't. We allocate the memory in QueryInterface(), and delete it in
* I always knew that COM was a POS. Now the C++ compiler agrees with me.
#pragma warning (disable:6258)
/** Using TerminateThread() does not allow proper thread clean up. Yes,
* there is one place where we use TerminateThread, but we only use it
* in an extreme circumstance (so extreme, that the user would have
* killed the thread themselves).
* We send the worker thread a cleanup message, via the fully supported
* WM_CLOSE. This initiates the complete thread cleanup which Should
* finish in less than a second. Once the thread handle gets signalled,
* we wake back up and finish off. Only in the extreme circumstance where
* it takes over 10 minutes to shutdown, do we kill it. If the worker
* thread hangs, we hang; so it comes to the same thing whether the user
* kills the thread or we kill the thread.
#endif /* REENABLE_ERRORS_H */
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here