The MASM Forum

General => The Campus => Topic started by: TriggerFinger on July 22, 2012, 05:16:37 PM

Title: JoinDomainOrWorkgroup or similar API that works with MASM32
Post by: TriggerFinger on July 22, 2012, 05:16:37 PM
Hi,

I am trying to create a program that would change a computer's name and workgroup. I was able to do the first one but I do not know the API to change the workgroup. I found JoinDomainOrWorkgroup API in MS website that would seem to do the job but it does not work in MASM.  :(  Is there a lib or inc file I need to include for this API to work?

Thanks.
TF
Title: Re: JoinDomainOrWorkgroup or similar API that works with MASM32
Post by: Vortex on July 22, 2012, 05:48:44 PM
Hello,

Did you check the NetJoinDomain API?

http://msdn.microsoft.com/en-us/library/aa370433.aspx
Title: Re: JoinDomainOrWorkgroup or similar API that works with MASM32
Post by: TriggerFinger on July 23, 2012, 10:02:18 AM
Thank you Vortex. I tried it and I believe it would do the job only if I know how to set the fJoinOption flags :(. Any tips on how to set the fJoinOption flags?

EDIT...

I got it to work... Thanks.

TF
Title: Re: JoinDomainOrWorkgroup or similar API that works with MASM32
Post by: Vortex on July 24, 2012, 04:26:34 AM
Hi TriggerFinger,

One could even create a simple command-line tool based on this API to join domains easily.