Hi leute,
in der Funktion NetJoinDomain gibt es einen Paramater Namens "FJoinOptions".
gehe ich da richtig in der Annahme, dass es sich um Konstanten handelt?
Habe ich diese Konstanten richtig definiert und zugeordnet?
Die Funktion selber:
Delphi-Quellcode:
function NetJoinDomain(const lpServer: PWChar; const lpDomain:
PWChar; const lpAccountOU: PWChar; const lpAccount: PWChar; const lpPassword:
PWChar; const fJoinOptions: DWord): NET_API_STATUS; stdcall; external
'netapi32.dll';
und meine Konstantendefinition:
Delphi-Quellcode:
const
NETSETUP_JOIN_DOMAIN = 0;
NETSETUP_ACCT_CREATE = 1;
NETSETUP_WIN9X_UPGRADE = 2;
NETSETUP_DOMAIN_JOIN_IF_JOINED = 3;
NETSETUP_JOIN_UNSECURE = 4;
NETSETUP_MACHINE_PWD_PASSED = 5;
Hier noch die Beschreibung der einzelnen Konstanten.
fJoinOptions
[in] Specifies a value that contains a set of bit flags defining the join options. This parameter can be one or more of the following values. Value Meaning
NETSETUP_JOIN_DOMAIN Joins the computer to a domain. If this value is not specified, joins the computer to a workgroup.
NETSETUP_ACCT_CREATE Creates the account on the domain.
NETSETUP_WIN9X_UPGRADE The join operation is occurring as part of an upgrade of Windows Me/98/95.
NETSETUP_DOMAIN_JOIN_IF_JOINED Allows a join to a new domain even if the computer is already joined to a domain.
NETSETUP_JOIN_UNSECURE Performs an unsecured join.
NETSETUP_MACHINE_PWD_PASSED Indicates that the lpPassword parameter specifies a local machine account password rather than a user password. This flag is valid only for unsecured joins, which you must indicate by also setting the NETSETUP_JOIN_UNSECURE flag.
If you set this flag, then after the join operation succeeds, the machine password will be set to the value of lpPassword, if that value is a valid machine password.
Die weiter Frage
Kann ich diesen Konstanten einfach die Werte von = 0 bis 5 zuweisen und zwar in der Reihenfolge, wie sie in der Hilfe beschrieben sind?