DragExt.h 1.7 KB

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