Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. NetLocalGroupAddMembers

NetLocalGroupAddMembers

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sonu Kapoor
    wrote on last edited by
    #1

    Hey guys, I am trying to add a member into a group. A user and a group already exists, but if I call this function, I get the system error code 1376: The specified local group does not exist. I recognized that if I call this function after creating a user it success. So what can I do here ??? see my code: USES_CONVERSION; wchar_t *pswzGroup = T2W("A"); wchar_t *pswzUser = T2W("X"); LOCALGROUP_MEMBERS_INFO_3 localgroup_members; localgroup_members.lgrmi3_domainandname = pswzUser; nStatus=NetLocalGroupAddMembers(NULL,pswzGroup,3,(LPBYTE)&localgroup_members,1); if(nStatus == NERR_Success) return "Groups(s) added succesfully to the group.\r\n"; if(nStatus == ERROR_ACCESS_DENIED) return "Access denied.\r\n"; if(nStatus == NERR_GroupNotFound) return "The user does not have access to the requested information.\r\n"; if(nStatus == ERROR_NO_SUCH_MEMBER) return "One or more of the members specified do not exist. Therefore, no new members were added.\r\n"; if(nStatus == ERROR_MEMBER_IN_ALIAS) return "One or more of the members specified were already members of the local group. No new members were added.\r\n"; if(nStatus == ERROR_INVALID_MEMBER) return "One or more of the members cannot be added because their account type is invalid. No new members were added.\r\n"; else{ CString str; str.Format("Error->Code: %d\r\n",nStatus); return str; } thanks, sonu da sonu :cool:

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups