NetUserAdd (netapi32)
Last changed: -204.104.55.241

.
Summary
Adds a user account.

C# Signature:

[DllImport("netapi32.dll", CharSet=CharSet.Unicode, SetLastError=true)]
private static extern int Win32_NetUserAdd(
     [MarshalAs(UnmanagedType.LPWStr)] string servername,
     UInt32 level,
     IntPtr userInfo,
     out UInt32 parm_err);

VB Signature:

Declare Function NetUserAdd Lib "netapi32.dll" (TODO) As TODO

User-Defined Types:

USER_INFO_1

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

If the method will only be used with a single user info level, then the userInfo parameter can be simplified to be ref USER_INFO_# userInfo where # is the level you intend to pass.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation
NetUserAdd on MSDN