Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NetJoinDomain

Status
Not open for further replies.

rcasey31

Programmer
Mar 11, 2003
2
US
When I use the NetJoinDomain() I keep geting errors such as "Network path not found" or "Domain not found". I think it may have something to do with the way I'm passing the parameters or something. However, It can determine if a pc is already joined to a domain.

thanks
rcasey
 
Please give an example of how you are calling this function

thanks
 
Hey thanks for your reply.
Well, I have tried two different versions both of which have produced the same results.

NetJoinDomain(Chr(0), "domain\0", Chr(0), "account\0", "pwd\0", NETSETUP_JOIN_DOMAIN)

NetJoinDomain(Chr(0), "domain" & chr(0), Chr(0), "Account" & chr(0), "Pwd" & chr(0), NETSETUP_JOIN_DOMAIN)

The first argument is NULL because I plan to execute the code on the target pc. In the first call the 2nd argument needs to be a null terminated string. So I've tact on a C-style Null chr at the end of the string. In the past on other projects I've had success passing a string this way. But I wasn't sure if that would work so that is why in the second version I append a null chr instead.

Here a synopsis of what I trying to do. I trying to join Win2k/Xp clients to a NT 4 domain controler. After reading Microsoft Msdn's on this function it reads to me that this possible to do but I'm not 100% sure. The main error msg I've been receiving is "Network Path was not found". Which is why I think it has something to do with how I passing my Domain argument. There is no problem w/ network because I have manual join the same pc to the domain. So no actual physical network problems exist.

thanks
rcasey
 
Did you ever get a reply on this??

I am having a similar problem. The NetJoinDomain use to work but now isn't. Have asked all the normal questions like what has changed on the network etc.

What is different between NetJoinDomain and a Manual join?

We get different errors, we get the Domain not Found and also username or password is incorrect or you do not have sufficient privileges.

Any help appreciated.

Regards
Steve

Regards
Steve Friday
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top