Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
3.5 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1998.
  5. //
  6. // File: I C O M T A R G F . C P P
  7. //
  8. // Contents: ICommandTarget implementation for IConnectionFolder
  9. //
  10. // Notes:
  11. //
  12. // Author: jeffspr 12 Mar 1998
  13. //
  14. //----------------------------------------------------------------------------
  15. #include "pch.h"
  16. #pragma hdrstop
  17. #include "foldinc.h" // Standard shell\tray includes
  18. const IID CGID_ConnectionsFolder =
  19. {0xeaf70ce4,0xb521,0x11d1,{0xb5,0x50,0x00,0xc0,0x4f,0xd9,0x18,0xd0}};
  20. //+---------------------------------------------------------------------------
  21. //
  22. // Member: CConnectionFolder::QueryStatus
  23. //
  24. // Purpose: [IOleCommandTarget] Queries the object for the status of one
  25. // or more commands generated by user interface events.
  26. //
  27. // This interface is required but is currently unimplemented
  28. //
  29. // Arguments:
  30. // pguidCmdGroup [in] // Pointer to command group
  31. // cCmds [in] // Number of commands in prgCmds array
  32. // prgCmds [in,out] // Array of commands
  33. // pCmdText [in,out] // Pointer to name or status of command
  34. //
  35. // Returns:
  36. //
  37. // Author: jeffspr 12 Aug 1999
  38. //
  39. // Notes:
  40. //
  41. HRESULT CConnectionFolder::QueryStatus(
  42. IN const GUID * pguidCmdGroup,
  43. IN ULONG cCmds,
  44. IN OUT OLECMD prgCmds[],
  45. IN OUT OLECMDTEXT * pCmdText)
  46. {
  47. TraceFileFunc(ttidShellFolderIface);
  48. HRESULT hr = E_NOTIMPL;
  49. TraceHr(ttidError, FAL, hr, (hr == E_NOTIMPL), "CConnectionFolder::QueryStatus");
  50. return hr;
  51. }
  52. //+---------------------------------------------------------------------------
  53. //
  54. // Member: CConnectionFolder::Exec
  55. //
  56. // Purpose: [IOleCommandTarget] Executes a specified command or displays
  57. // help for a command.
  58. //
  59. // This method is not currently referenced, but if the shell
  60. // wanted to enumerate only incoming our outgoing connections,
  61. // it would use the CFCID_SETENUMTYPE command to force the
  62. // issue (that is unimplemented on our side, however)
  63. //
  64. // Arguments:
  65. // pguidCmdGroup [in] // Pointer to command group
  66. // nCmdID [in] // Identifier of command to execute
  67. // nCmdexecopt [in] // Options for executing the command
  68. // pvaIn [in] // Pointer to input arguments
  69. // pvaOut [in,out] // Pointer to command output
  70. //
  71. // Returns:
  72. //
  73. // Author: jeffspr 12 Aug 1999
  74. //
  75. // Notes:
  76. //
  77. HRESULT CConnectionFolder::Exec(
  78. IN const GUID * pguidCmdGroup,
  79. IN DWORD nCmdID,
  80. IN DWORD nCmdexecopt,
  81. IN VARIANTARG * pvaIn,
  82. IN OUT VARIANTARG * pvaOut)
  83. {
  84. TraceFileFunc(ttidShellFolderIface);
  85. HRESULT hr = NOERROR;
  86. if (!pguidCmdGroup)
  87. {
  88. return hr;
  89. }
  90. // Handle Shell pre-enumeration commands here.
  91. //
  92. if (IsEqualGUID(*pguidCmdGroup, CGID_ConnectionsFolder))
  93. {
  94. switch (nCmdID)
  95. {
  96. case CFCID_SETENUMTYPE:
  97. m_dwEnumerationType = nCmdexecopt;
  98. break;
  99. default:
  100. hr = S_OK;
  101. break;
  102. }
  103. }
  104. TraceHr(ttidError, FAL, hr, FALSE, "CConnectionFolder::Exec");
  105. return hr;
  106. }