1
0

DragExt.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //---------------------------------------------------------------------------
  2. #ifndef DragExtH
  3. #define DragExtH
  4. //---------------------------------------------------------------------------
  5. #define DRAG_EXT_MAPPING L"WinSCPDragExtMapping"
  6. #define DRAG_EXT_MUTEX L"WinSCPDragExtMutex"
  7. #define DRAG_EXT_RUNNING_MUTEX L"WinSCPDragExtLogMutex"
  8. #define DRAG_EXT_DUMMY_DIR_PREFIX L"scp"
  9. #define DRAG_EXT_DUMMY_DIR_PREFIX_LEN 3
  10. //---------------------------------------------------------------------------
  11. #ifdef _WIN64
  12. #pragma clang diagnostic push
  13. #pragma clang diagnostic ignored "-Wpadded"
  14. #pragma clang diagnostic ignored "-Wmissing-variable-declarations"
  15. #endif
  16. //---------------------------------------------------------------------------
  17. DEFINE_GUID(CLSID_ShellExtension, 0xe15e1d68, 0x0d1c, 0x49f7,
  18. 0xbe, 0xb8, 0x81, 0x2b, 0x1e, 0x00, 0xfa, 0x60 );
  19. //---------------------------------------------------------------------------
  20. #pragma pack(push, 4)
  21. //---------------------------------------------------------------------------
  22. // Note that the change between 0 and 1 was incompatible in both directions.
  23. // So unfortunately version 0 extension (4.x and older) will accept incompatible request
  24. // from version 1 application (5.x and newer).
  25. // Luckily the extension will gracefully fail, when using the Unicode path in
  26. // GetShortPathName(CommStruct->DropDest, ...) and will ignore the request.
  27. struct TDragExtCommStruct
  28. {
  29. enum TVersion
  30. {
  31. Version0 = 0,
  32. Version1 = 1,
  33. CurrentVersion = Version1,
  34. MinVersion = Version1,
  35. MaxVersion = CurrentVersion
  36. };
  37. int Version;
  38. bool Dragging;
  39. wchar_t DropDest[MAX_PATH];
  40. };
  41. //---------------------------------------------------------------------------
  42. #pragma pack(pop)
  43. #ifdef _WIN64
  44. #pragma clang diagnostic pop
  45. #endif
  46. //---------------------------------------------------------------------------
  47. #endif // DragExtH