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. Visual Basic
  4. Calling NetUserSetGroups API in VB.Net

Calling NetUserSetGroups API in VB.Net

Scheduled Pinned Locked Moved Visual Basic
questioncsharpsysadmindata-structures
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.
  • C Offline
    C Offline
    Calvinix
    wrote on last edited by
    #1

    How do i call NetUserSetGroups ( in netapi32.dll ) in VB.Net ? The prototype of NetUserSetGroups is as given below. NET_API_STATUS NetUserSetGroups( LPCWSTR servername, LPCWSTR username, DWORD level, LPBYTE buf, DWORD num_entries ); Parameters ( from MSDN ) servername [in] Pointer to a constant string that specifies the DNS or NetBIOS name of the remote server on which the function is to execute. If this parameter is NULL, the local computer is used. username [in] Pointer to a constant string that specifies the name of the user for which to set global group memberships. For more information, see the following Remarks section. level [in] Specifies the information level of the data. This parameter can be the following value. Value Meaning 0 The buf parameter points to an array of GROUP_USERS_INFO_0 structures that specifies global group names. The GROUP_USERS_INFO_0 structure contains global group member information. typedef struct _GROUP_USERS_INFO_0 { LPWSTR grui0_name; } GROUP_USERS_INFO_0, *PGROUP_USERS_INFO_0, *LPGROUP_USERS_INFO_0; buf [in] Pointer to the buffer that specifies the data. num_entries [in] Specifies the number of entries contained in the array pointed to by the buf parameter. Thanks in advance. Ashik

    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