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 |
|
---|
9 | #ifdef __cplusplus
|
---|
10 | extern "C" {
|
---|
11 | #endif
|
---|
12 |
|
---|
13 | typedef enum _NETSETUP_NAME_TYPE {
|
---|
14 | NetSetupUnknown = 0,NetSetupMachine,NetSetupWorkgroup,NetSetupDomain,NetSetupNonExistentDomain,
|
---|
15 | NetSetupDnsMachine
|
---|
16 | } NETSETUP_NAME_TYPE,*PNETSETUP_NAME_TYPE;
|
---|
17 |
|
---|
18 | typedef enum _NETSETUP_JOIN_STATUS {
|
---|
19 | NetSetupUnknownStatus = 0,NetSetupUnjoined,NetSetupWorkgroupName,NetSetupDomainName
|
---|
20 | } NETSETUP_JOIN_STATUS,*PNETSETUP_JOIN_STATUS;
|
---|
21 |
|
---|
22 | #define NETSETUP_JOIN_DOMAIN 0x00000001
|
---|
23 | #define NETSETUP_ACCT_CREATE 0x00000002
|
---|
24 | #define NETSETUP_ACCT_DELETE 0x00000004
|
---|
25 | #define NETSETUP_WIN9X_UPGRADE 0x00000010
|
---|
26 | #define NETSETUP_DOMAIN_JOIN_IF_JOINED 0x00000020
|
---|
27 | #define NETSETUP_JOIN_UNSECURE 0x00000040
|
---|
28 | #define NETSETUP_MACHINE_PWD_PASSED 0x00000080
|
---|
29 | #define NETSETUP_DEFER_SPN_SET 0x00000100
|
---|
30 |
|
---|
31 | #define NETSETUP_INSTALL_INVOCATION 0x00040000
|
---|
32 | #define NETSETUP_IGNORE_UNSUPPORTED_FLAGS 0x10000000
|
---|
33 |
|
---|
34 | #define NETSETUP_VALID_UNJOIN_FLAGS (NETSETUP_ACCT_DELETE | NETSETUP_IGNORE_UNSUPPORTED_FLAGS)
|
---|
35 |
|
---|
36 | NET_API_STATUS WINAPI NetJoinDomain(LPCWSTR lpServer,LPCWSTR lpDomain,LPCWSTR lpAccountOU,LPCWSTR lpAccount,LPCWSTR lpPassword,DWORD fJoinOptions);
|
---|
37 | NET_API_STATUS WINAPI NetUnjoinDomain(LPCWSTR lpServer,LPCWSTR lpAccount,LPCWSTR lpPassword,DWORD fUnjoinOptions);
|
---|
38 | NET_API_STATUS WINAPI NetRenameMachineInDomain(LPCWSTR lpServer,LPCWSTR lpNewMachineName,LPCWSTR lpAccount,LPCWSTR lpPassword,DWORD fRenameOptions);
|
---|
39 | NET_API_STATUS WINAPI NetValidateName(LPCWSTR lpServer,LPCWSTR lpName,LPCWSTR lpAccount,LPCWSTR lpPassword,NETSETUP_NAME_TYPE NameType);
|
---|
40 | NET_API_STATUS WINAPI NetGetJoinInformation(LPCWSTR lpServer,LPWSTR *lpNameBuffer,PNETSETUP_JOIN_STATUS BufferType);
|
---|
41 | NET_API_STATUS WINAPI NetGetJoinableOUs(LPCWSTR lpServer,LPCWSTR lpDomain,LPCWSTR lpAccount,LPCWSTR lpPassword,DWORD *OUCount,LPWSTR **OUs);
|
---|
42 |
|
---|
43 | #define NET_IGNORE_UNSUPPORTED_FLAGS 0x01
|
---|
44 |
|
---|
45 | NET_API_STATUS WINAPI NetAddAlternateComputerName(LPCWSTR Server,LPCWSTR AlternateName,LPCWSTR DomainAccount,LPCWSTR DomainAccountPassword,ULONG Reserved);
|
---|
46 | NET_API_STATUS WINAPI NetRemoveAlternateComputerName(LPCWSTR Server,LPCWSTR AlternateName,LPCWSTR DomainAccount,LPCWSTR DomainAccountPassword,ULONG Reserved);
|
---|
47 | NET_API_STATUS WINAPI NetSetPrimaryComputerName(LPCWSTR Server,LPCWSTR PrimaryName,LPCWSTR DomainAccount,LPCWSTR DomainAccountPassword,ULONG Reserved);
|
---|
48 |
|
---|
49 | typedef enum _NET_COMPUTER_NAME_TYPE {
|
---|
50 | NetPrimaryComputerName,NetAlternateComputerNames,NetAllComputerNames,NetComputerNameTypeMax
|
---|
51 | } NET_COMPUTER_NAME_TYPE,*PNET_COMPUTER_NAME_TYPE;
|
---|
52 |
|
---|
53 | NET_API_STATUS WINAPI NetEnumerateComputerNames(LPCWSTR Server,NET_COMPUTER_NAME_TYPE NameType,ULONG Reserved,PDWORD EntryCount,LPWSTR **ComputerNames);
|
---|
54 |
|
---|
55 | #ifdef __cplusplus
|
---|
56 | }
|
---|
57 | #endif
|
---|
58 | #endif
|
---|