NetGroupGetUsers API call in C#

csharp Canada
  • 18 years ago

    I need to invoke the API call NetGroupGetUSers to get a list of network users in C#. The call is as follows:


    NETAPISTATUS NetGroupGetUsers(
     LPCWSTR servername,      
     LPCWSTR groupname,      
     DWORD level,            
     LPBYTE *bufptr,          
     DWORD prefmaxlen,        
     LPDWORD entriesread,    
     LPDWORD totalentries,    
     PDWORD_PTR ResumeHandle  
    );


    Could someone guide me as to how this translates to C#


    Thanks

  • 18 years ago

    I have same problem (calling mpr.dll).
    This is not an solution but....


    Made an ocx(u can make an dll) and referenced in c#.
    Framework creates an wrapper(with AxHost class) automatically so I can call
    network functions from my unmanaged component.


    Is not the answer to ur question...but hope this helps..
    Xcuse my english


Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Beware of bugs in the above code; I have only proved it correct, not tried it.” - Donald Knuth