Author Topic: JoinDomainOrWorkgroup or similar API that works with MASM32  (Read 3469 times)

TriggerFinger

  • Guest
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

Vortex

  • Member
  • *****
  • Posts: 2794
Re: JoinDomainOrWorkgroup or similar API that works with MASM32
« Reply #1 on: July 22, 2012, 05:48:44 PM »
Hello,

Did you check the NetJoinDomain API?

http://msdn.microsoft.com/en-us/library/aa370433.aspx

TriggerFinger

  • Guest
Re: JoinDomainOrWorkgroup or similar API that works with MASM32
« Reply #2 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
« Last Edit: July 23, 2012, 04:54:48 PM by TriggerFinger »

Vortex

  • Member
  • *****
  • Posts: 2794
Re: JoinDomainOrWorkgroup or similar API that works with MASM32
« Reply #3 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.