Using Win32 functions in Visual FoxPro Image Gallery
Windows Networking
..msdn
NetGetJoinInformation
NetJoinDomain
NetUnjoinDomain
WNetAddConnection
WNetAddConnection2
WNetCancelConnection2
WNetCloseEnum
WNetConnectionDialog
WNetConnectionDialog1
WNetDisconnectDialog
WNetEnumResource
WNetGetConnection
WNetGetLastError
WNetGetNetworkInformation
WNetGetProviderName
WNetGetUniversalName
WNetGetUser
WNetOpenEnum
Code examples:
Joining local computer to a domain (XP/2000)
NetJoinDomain
..msdn    Add comment     W32 Constants      Translate this page
The NetJoinDomain function joins a computer to a workgroup or domain.
Code examples:
Joining local computer to a domain (XP/2000)
Declaration:
NET_API_STATUS NetJoinDomain(
  LPCWSTR lpServer,
  LPCWSTR lpDomain,
  LPCWSTR lpAccountOU,
  LPCWSTR lpAccount,
  LPCWSTR lpPassword,
  DWORD fJoinOptions
);

FoxPro declaration:
DECLARE INTEGER NetJoinDomain IN netapi32;
    STRING  lpServer,;
    STRING  lpDomain,;
    STRING  lpAccountOU,;
    STRING  lpAccount,;
    STRING  lpPassword,;
    INTEGER fJoinOptions
Parameters:
lpServer
[in] Pointer to a constant string that specifies the DNS or NetBIOS name of the computer on which to call the function.

lpDomain
[in] Pointer to a constant null-terminated character string that specifies the name of the domain or workgroup to join.

lpAccountOU
[in] Optionally specifies the pointer to a constant null-terminated character string that contains the RFC 1779 format name of the organizational unit (OU) for the computer account.

lpAccount
[in] Pointer to a constant null-terminated character string that specifies the account name to use when connecting to the domain controller.

lpPassword
[in] If the lpAccount parameter specifies an account name, this parameter must point to the password to use when connecting to the domain controller.

fJoinOptions
[in] Specifies a value that contains a set of bit flags defining the join options.
Return value:
If the function succeeds, the return value is NERR_Success (0).
My comment:
Joining (and unjoining) a computer to a domain or workgroup can be performed only by a member of the Administrators local group on the target computer.
Word Index links for the NetJoinDomain :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2004-06-14 10:13:56
Modified: 2004-06-14 10:16:18
Visited in last 7 days: 25
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.91.171.137)
9 sec.Function: 'GetPrinter'
20 sec.Function: 'CoCreateGuid'
30 sec.Function: 'IsIconic'
41 sec.Function: 'mmioAscend'
58 sec.Function: 'RegEnumKey'
1.2 min.Function: 'sndPlaySound'
1.45 min.Function: 'EnumDisplayDevices'
1.67 min.Function: 'WNetGetUser'
1.88 min.Function: 'CeCloseHandle'
2.12 min.Function: 'GdipDeleteFontFamily'
Google
Advertise here!