Source code of Windows XP (NT5)
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
2.4 KiB

  1. //
  2. //
  3. //
  4. #ifndef _OLECONFIG_
  5. #define _OLECONFIG_
  6. #include <nt.h>
  7. #include <ntrtl.h>
  8. #include <nturtl.h>
  9. #include <ntlsa.h>
  10. #include <windows.h>
  11. #include <stdlib.h>
  12. #include <stdio.h>
  13. #include <conio.h>
  14. #define ENABLE_NETWORK_OLE 1
  15. #define DEFAULT_LAUNCH_PERMISSION 2
  16. #define DEFAULT_ACCESS_PERMISSION 3
  17. #define LEGACY_AUTHENTICATION_LEVEL 4
  18. #define GLOBAL_KEYS 4
  19. #define MERGE 101
  20. #define SAVE_USER 102
  21. #define SAVE_COMMON 103
  22. #define GLOBAL_OPERATIONS 103
  23. #define INPROC_HANDLER32 1
  24. #define INPROC_SERVER32 2
  25. #define LOCAL_SERVER32 3
  26. #define LOCAL_SERVICE 4
  27. #define REMOTE_SERVER_NAME 5
  28. #define RUN_AS 6
  29. #define ACTIVATE_AT_STORAGE 7
  30. #define LAUNCH_PERMISSION 8
  31. #define ACCESS_PERMISSION 9
  32. #define CLSID_KEYS 9
  33. #define CLSID_PATH_KEYS 4
  34. #define UNKNOWN 0
  35. #define END_OF_ARGS -1
  36. #define INVALID -1
  37. #define NO 1
  38. #define YES 2
  39. #define EAT_ARG() Args++; ArgsLeft--;
  40. typedef struct
  41. {
  42. char * Clsid;
  43. char * ClsidDescription;
  44. char * ProgId;
  45. char * ProgIdDescription;
  46. int LaunchPermission;
  47. int AccessPermission;
  48. int ActivateAtStorage;
  49. char * ServerPaths[CLSID_PATH_KEYS+1];
  50. char * RemoteServerName;
  51. char * RunAsUserName;
  52. char * RunAsPassword;
  53. } CLSID_INFO;
  54. extern const char * GlobalKeyNames[];
  55. extern const char * ClsidKeyNames[];
  56. extern int ArgsLeft;
  57. extern char ** Args;
  58. extern char * ProgramName;
  59. extern HKEY hRegOle;
  60. extern HKEY hRegClsid;
  61. // main.c
  62. void ParseClsidProgId();
  63. int NextClsidKey();
  64. int ReadYesOrNo();
  65. void DisplayHelp();
  66. // oleconfig.c
  67. BOOL SetGlobalKey(
  68. int Key,
  69. int Value );
  70. void DisplayGlobalSettings();
  71. void DisplayClsidKeys(
  72. CLSID_INFO * ClsidInfo );
  73. void UpdateClsidKeys(
  74. CLSID_INFO * ClsidInfo );
  75. BOOL SetClsidKey(
  76. HKEY hClsid,
  77. char * Clsid,
  78. const char * Key,
  79. char * Value );
  80. BOOL DeleteClsidKey(
  81. HKEY hClsid,
  82. char * Clsid,
  83. const char * Key );
  84. void ReadPassword(
  85. char * Password );
  86. BOOL ControlCConsoleHandler(
  87. DWORD ControlType );
  88. void MergeHives( );
  89. void SaveChangesToUser( );
  90. void SaveChangesToCommon( );
  91. #endif
  92.