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.

73 lines
3.2 KiB

  1. #ifndef H__shrtrust
  2. #define H__shrtrust
  3. /*
  4. NetDDE will fill in the following structure and pass it to NetDDE
  5. Agent whenever it wants to have an app started in the user's
  6. context. The reason for the sharename and modifyId is to that
  7. a user must explicitly permit NetDDE to start an app on behalf of
  8. other users.
  9. */
  10. #define NDDEAGT_CMD_REV 1
  11. #define NDDEAGT_CMD_MAGIC 0xDDE1DDE1
  12. /* commands */
  13. #define NDDEAGT_CMD_WINEXEC 0x1
  14. #define NDDEAGT_CMD_WININIT 0x2
  15. /* return status */
  16. #define NDDEAGT_START_NO 0x0
  17. #define NDDEAGT_INIT_NO 0x0
  18. #define NDDEAGT_INIT_OK 0x1
  19. typedef struct {
  20. DWORD dwMagic; // must be NDDEAGT_CMD_MAGIC
  21. DWORD dwRev; // must be 1
  22. DWORD dwCmd; // one of above NDDEAGT_CMD_*
  23. DWORD qwModifyId[2]; // modify Id of the share
  24. UINT fuCmdShow; // fuCmdShow to use with WinExec()
  25. char szData[1]; // sharename\0 cmdline\0
  26. } NDDEAGTCMD;
  27. typedef NDDEAGTCMD *PNDDEAGTCMD;
  28. #define DDE_SHARE_KEY_MAX 512
  29. #define TRUSTED_SHARES_KEY_MAX 512
  30. #define TRUSTED_SHARES_KEY_SIZE 15
  31. #define KEY_MODIFY_ID_SIZE 8
  32. #define DDE_SHARES_KEY_A "SOFTWARE\\Microsoft\\NetDDE\\DDE Shares"
  33. #define TRUSTED_SHARES_KEY_A "SOFTWARE\\Microsoft\\NetDDE\\DDE Trusted Shares"
  34. #define DEFAULT_TRUSTED_SHARES_KEY_A "DEFAULT\\"##TRUSTED_SHARES_KEY_A
  35. #define TRUSTED_SHARES_KEY_PREFIX_A "DDEDBi"
  36. #define TRUSTED_SHARES_KEY_DEFAULT_A "DDEDBi12345678"
  37. #define KEY_MODIFY_ID_A "SerialNumber"
  38. #define KEY_DB_INSTANCE_A "ShareDBInstance"
  39. #define KEY_CMDSHOW_A "CmdShow"
  40. #define KEY_START_APP_A "StartApp"
  41. #define KEY_INIT_ALLOWED_A "InitAllowed"
  42. #define DDE_SHARES_KEY_W L"SOFTWARE\\Microsoft\\NetDDE\\DDE Shares"
  43. #define TRUSTED_SHARES_KEY_W L"SOFTWARE\\Microsoft\\NetDDE\\DDE Trusted Shares"
  44. #define DEFAULT_TRUSTED_SHARES_KEY_W L"DEFAULT\\"##TRUSTED_SHARES_KEY_W
  45. #define TRUSTED_SHARES_KEY_PREFIX_W L"DDEDBi"
  46. #define TRUSTED_SHARES_KEY_DEFAULT_W L"DDEDBi12345678"
  47. #define KEY_MODIFY_ID_W L"SerialNumber"
  48. #define KEY_DB_INSTANCE_W L"ShareDBInstance"
  49. #define KEY_CMDSHOW_W L"CmdShow"
  50. #define KEY_START_APP_W L"StartApp"
  51. #define KEY_INIT_ALLOWED_W L"InitAllowed"
  52. #define DDE_SHARES_KEY TEXT(DDE_SHARES_KEY_A)
  53. #define TRUSTED_SHARES_KEY TEXT(TRUSTED_SHARES_KEY_A)
  54. #define DEFAULT_TRUSTED_SHARES_KEY TEXT(DEFAULT_TRUSTED_SHARES_KEY_A)
  55. #define TRUSTED_SHARES_KEY_PREFIX TEXT(TRUSTED_SHARES_KEY_PREFIX_A)
  56. #define TRUSTED_SHARES_KEY_DEFAULT TEXT(TRUSTED_SHARES_KEY_DEFAULT_A)
  57. #define KEY_MODIFY_ID TEXT(KEY_MODIFY_ID_A)
  58. #define KEY_DB_INSTANCE TEXT(KEY_DB_INSTANCE_A)
  59. #define KEY_CMDSHOW TEXT(KEY_CMDSHOW_A)
  60. #define KEY_START_APP TEXT(KEY_START_APP_A)
  61. #define KEY_INIT_ALLOWED TEXT(KEY_INIT_ALLOWED_A)
  62. #endif
  63.