1
0

DragExt.h 1.7 KB

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