Workgroup/Domain Name

Discussion in 'Mac Programming' started by Sunil, Sep 28, 2007.

  1. Sunil macrumors newbie

    Joined:
    Oct 6, 2005
    #1
    Hi Guys,

    I have one client application and one server application written in cocoa.
    My client is running on different machines and connected with my server in LAN.
    Now I want to find the Domain Name or Workgroup Name from my client application of that machine where my client is running and send it to my server. So on server side I can segregate my different clients which are connected with my server belongs to which workgroup/domain.

    In windows there is one api to find the wrokgroup "NetWkstaGetInfo" then what is similar to this api in Mac?

    Please suggest me some link or sample code.

    Thanks,
    sunil.
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    Well, using nm and otool, Directory Access's SMB plugin links with DirectoryServices.framework, and calls several functions, which may be public (DirectoryServices.framework has several header files):

    dsBuildListFromStrings
    dsDataBufferAllocate
    dsDataBufferDeAllocate
    dsDataNodeAllocateBlock
    dsDoPlugInCustomCall
    dsOpenDirNode

    Maybe the answer lies in those functions?
     
  3. Sunil thread starter macrumors newbie

    Joined:
    Oct 6, 2005
    #3
    workgroup/domain name

    thanks for reply kainjow

    is it necessary configured my local machine in DCP mode?
    if all the workgroup is maintained on windows server in this scenario will i able to find out the my Mac machine workgroup?

    thanks,
    sunil.
     

Share This Page