copyhook.cpp 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  19. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  20. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  21. // PARTICULAR PURPOSE.
  22. //
  23. // Copyright (C) 1993-1997 Microsoft Corporation. All Rights Reserved.
  24. //
  25. // MODULE: copyhook.cpp
  26. //
  27. // PURPOSE: Implements the ICopyHook member functions necessary to support
  28. // the copy hook portioins of this shell extension.
  29. // Copy hook handlers are called each time a folder is copied, moved,
  30. // renamed, etc. in the system. Note that the CopyCallback is NOT
  31. // called for each file, but only for entire folders.
  32. //
  33. #include "StdAfx.h"
  34. #include "priv.h"
  35. #include "shellext.h"
  36. //
  37. // FUNCTION: CShellExt::CopyCallback(HWND,
  38. // UINT,
  39. // UINT,
  40. // LPCSTR,
  41. // DWORD,
  42. // LPCSTR,
  43. // DWORD)
  44. //
  45. // PURPOSE: Called by the shell when a folder is being manipulated.
  46. //
  47. // PARAMETERS:
  48. // hwnd - Window handle to use for any UI stuff
  49. // wFunc - what operation is being done
  50. // wFlags - and flags (FOF_*) set in the initial call
  51. // to the file operation
  52. // pszSrcFile - name of the source file
  53. // dwSrcAttribs - file attributes of the source file
  54. // pszDestFile - name of the destiation file (for move and renames)
  55. // dwDestAttribs - file attributes of the destination file
  56. //
  57. // RETURN VALUE:
  58. //
  59. // IDYES - allow the operation
  60. // IDNO - disallow the operation on this file, but continue with
  61. // any other operations (eg. batch copy)
  62. // IDCANCEL - disallow the current operation and cancel any pending
  63. // operations
  64. //
  65. // COMMENTS:
  66. //
  67. STDMETHODIMP_(UINT) CShellExt::CopyCallback(HWND hwnd,
  68. UINT wFunc,
  69. UINT wFlags,
  70. LPCSTR pszSrcFile,
  71. DWORD dwSrcAttribs,
  72. LPCSTR pszDestFile,
  73. DWORD dwDestAttribs)
  74. {
  75. ODS("CShellExt::CopyCallback\r\n");
  76. return IDYES;
  77. }