lmjoin.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef __LMJOIN_H__
  7. #define __LMJOIN_H__
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. typedef enum _NETSETUP_NAME_TYPE {
  12. NetSetupUnknown = 0,NetSetupMachine,NetSetupWorkgroup,NetSetupDomain,NetSetupNonExistentDomain,
  13. NetSetupDnsMachine
  14. } NETSETUP_NAME_TYPE,*PNETSETUP_NAME_TYPE;
  15. typedef enum _NETSETUP_JOIN_STATUS {
  16. NetSetupUnknownStatus = 0,NetSetupUnjoined,NetSetupWorkgroupName,NetSetupDomainName
  17. } NETSETUP_JOIN_STATUS,*PNETSETUP_JOIN_STATUS;
  18. #define NETSETUP_JOIN_DOMAIN 0x00000001
  19. #define NETSETUP_ACCT_CREATE 0x00000002
  20. #define NETSETUP_ACCT_DELETE 0x00000004
  21. #define NETSETUP_WIN9X_UPGRADE 0x00000010
  22. #define NETSETUP_DOMAIN_JOIN_IF_JOINED 0x00000020
  23. #define NETSETUP_JOIN_UNSECURE 0x00000040
  24. #define NETSETUP_MACHINE_PWD_PASSED 0x00000080
  25. #define NETSETUP_DEFER_SPN_SET 0x00000100
  26. #define NETSETUP_INSTALL_INVOCATION 0x00040000
  27. #define NETSETUP_IGNORE_UNSUPPORTED_FLAGS 0x10000000
  28. #define NETSETUP_VALID_UNJOIN_FLAGS (NETSETUP_ACCT_DELETE | NETSETUP_IGNORE_UNSUPPORTED_FLAGS)
  29. NET_API_STATUS WINAPI NetJoinDomain(LPCWSTR lpServer,LPCWSTR lpDomain,LPCWSTR lpAccountOU,LPCWSTR lpAccount,LPCWSTR lpPassword,DWORD fJoinOptions);
  30. NET_API_STATUS WINAPI NetUnjoinDomain(LPCWSTR lpServer,LPCWSTR lpAccount,LPCWSTR lpPassword,DWORD fUnjoinOptions);
  31. NET_API_STATUS WINAPI NetRenameMachineInDomain(LPCWSTR lpServer,LPCWSTR lpNewMachineName,LPCWSTR lpAccount,LPCWSTR lpPassword,DWORD fRenameOptions);
  32. NET_API_STATUS WINAPI NetValidateName(LPCWSTR lpServer,LPCWSTR lpName,LPCWSTR lpAccount,LPCWSTR lpPassword,NETSETUP_NAME_TYPE NameType);
  33. NET_API_STATUS WINAPI NetGetJoinInformation(LPCWSTR lpServer,LPWSTR *lpNameBuffer,PNETSETUP_JOIN_STATUS BufferType);
  34. NET_API_STATUS WINAPI NetGetJoinableOUs(LPCWSTR lpServer,LPCWSTR lpDomain,LPCWSTR lpAccount,LPCWSTR lpPassword,DWORD *OUCount,LPWSTR **OUs);
  35. #define NET_IGNORE_UNSUPPORTED_FLAGS 0x01
  36. NET_API_STATUS WINAPI NetAddAlternateComputerName(LPCWSTR Server,LPCWSTR AlternateName,LPCWSTR DomainAccount,LPCWSTR DomainAccountPassword,ULONG Reserved);
  37. NET_API_STATUS WINAPI NetRemoveAlternateComputerName(LPCWSTR Server,LPCWSTR AlternateName,LPCWSTR DomainAccount,LPCWSTR DomainAccountPassword,ULONG Reserved);
  38. NET_API_STATUS WINAPI NetSetPrimaryComputerName(LPCWSTR Server,LPCWSTR PrimaryName,LPCWSTR DomainAccount,LPCWSTR DomainAccountPassword,ULONG Reserved);
  39. typedef enum _NET_COMPUTER_NAME_TYPE {
  40. NetPrimaryComputerName,NetAlternateComputerNames,NetAllComputerNames,NetComputerNameTypeMax
  41. } NET_COMPUTER_NAME_TYPE,*PNET_COMPUTER_NAME_TYPE;
  42. NET_API_STATUS WINAPI NetEnumerateComputerNames(LPCWSTR Server,NET_COMPUTER_NAME_TYPE NameType,ULONG Reserved,PDWORD EntryCount,LPWSTR **ComputerNames);
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46. #endif