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.

59 lines
1.4 KiB

  1. #include "setupp.h"
  2. #pragma hdrstop
  3. #ifndef _WIN64
  4. #include <setup_netdde.c>
  5. /************************************************************************
  6. * Copyright (c) Wonderware Software Development Corp. 1991-1992. *
  7. * All Rights Reserved. *
  8. *************************************************************************/
  9. // Modified 4/4/95 tedm
  10. BOOL
  11. InstallNetDDE(
  12. VOID
  13. )
  14. {
  15. HKEY hKey;
  16. BOOL b;
  17. LONG rc;
  18. rc = RegOpenKeyEx(
  19. HKEY_USERS,
  20. L".DEFAULT",
  21. 0,
  22. KEY_SET_VALUE | KEY_QUERY_VALUE,
  23. &hKey
  24. );
  25. if(rc == NO_ERROR) {
  26. if(b = CreateShareDBInstance()) {
  27. b = CreateDefaultTrust(hKey);
  28. }
  29. RegCloseKey(hKey);
  30. if(!b) {
  31. SetuplogError(
  32. LogSevWarning,
  33. SETUPLOG_USE_MESSAGEID,
  34. MSG_LOG_CANT_INIT_NETDDE, NULL,
  35. SETUPLOG_USE_MESSAGEID,
  36. MSG_LOG_NETDDELIB_FAILED,
  37. NULL,NULL);
  38. }
  39. } else {
  40. b = FALSE;
  41. SetuplogError(
  42. LogSevWarning,
  43. SETUPLOG_USE_MESSAGEID,
  44. MSG_LOG_CANT_INIT_NETDDE, NULL,
  45. SETUPLOG_USE_MESSAGEID,
  46. MSG_LOG_X_PARAM_RETURNED_WINERR,
  47. szRegOpenKeyEx,
  48. rc,
  49. L"HKEY_USERS\\.DEFAULT",
  50. NULL,NULL);
  51. }
  52. return(b);
  53. }
  54. #endif