UILib.cpp 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. // Copyright (c) 2010-2011, duilib develop team(www.duilib.com).
  2. // All rights reserved.
  3. //
  4. // Redistribution and use in source and binary forms, with or
  5. // without modification, are permitted provided that the
  6. // following conditions are met.
  7. //
  8. // Redistributions of source code must retain the above copyright
  9. // notice, this list of conditions and the following disclaimer.
  10. //
  11. // Redistributions in binary form must reproduce the above
  12. // copyright notice, this list of conditions and the following
  13. // disclaimer in the documentation and/or other materials
  14. // provided with the distribution.
  15. //
  16. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
  17. // CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
  18. // INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  19. // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  20. // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
  21. // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  22. // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  23. // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  24. // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  25. // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  26. // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  27. // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  28. // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. //
  30. //
  31. // DirectUI - UI Library
  32. //
  33. // Written by Bjarke Viksoe (bjarke@viksoe.dk)
  34. // Copyright (c) 2006-2007 Bjarke Viksoe.
  35. //
  36. // This code may be used in compiled form in any way you desire. These
  37. // source files may be redistributed by any means PROVIDING it is
  38. // not sold for profit without the authors written consent, and
  39. // providing that this notice and the authors name is included.
  40. //
  41. // This file is provided "as is" with no expressed or implied warranty.
  42. // The author accepts no liability if it causes any damage to you or your
  43. // computer whatsoever. It's free, so don't hassle me about it.
  44. //
  45. // Beware of bugs.
  46. //
  47. //
  48. #include "StdAfx.h"
  49. #include "UIlib.h"
  50. BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReason, LPVOID /*lpReserved*/)
  51. {
  52. switch( dwReason ) {
  53. case DLL_PROCESS_ATTACH:
  54. case DLL_THREAD_ATTACH:
  55. case DLL_THREAD_DETACH:
  56. case DLL_PROCESS_DETACH:
  57. ::DisableThreadLibraryCalls((HMODULE)hModule);
  58. break;
  59. }
  60. return TRUE;
  61. }