Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

USER_INFO_2 (netapi32)
 
.

C# Signature:

    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
    unsafe struct USER_INFO_2
    {
    [MarshalAs(UnmanagedType.LPWStr)] public string usri2_name;
    [MarshalAs(UnmanagedType.LPWStr)] public string usri2_password;
                      public uint   usri2_password_age;
                      public uint   usri2_priv;
    [MarshalAs(UnmanagedType.LPWStr)] public string usri2_home_dir;
    [MarshalAs(UnmanagedType.LPWStr)] public string usri2_comment;
                      public uint   usri2_flags;
    [MarshalAs(UnmanagedType.LPWStr)] public string usri2_script_path;
                      public uint   usri2_auth_flags;
    [MarshalAs(UnmanagedType.LPWStr)] public string usri2_full_name;
    [MarshalAs(UnmanagedType.LPWStr)] public string usri2_usr_comment;
    [MarshalAs(UnmanagedType.LPWStr)] public string usri2_parms;
    [MarshalAs(UnmanagedType.LPWStr)] public string usri2_workstations;
                      public uint   usri2_last_logon;
                      public uint   usri2_last_logoff;
                      public uint   usri2_acct_expires;
                      public uint   usri2_max_storage;
                      public uint   usri2_units_per_week;
                      public byte*  usri2_logon_hours;
                      public uint   usri2_bad_pw_count;
                      public uint   usri2_num_logons;
    [MarshalAs(UnmanagedType.LPWStr)] public string usri2_logon_server;
                      public uint   usri2_country_code;
                      public uint   usri2_code_page;
    }

VB.NET Signature:

    <StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
    Structure USER_INFO_2
    <MarshalAs(UnmanagedType.LPWStr)>
    Public usri2_name As String
    <MarshalAs(UnmanagedType.LPWStr)>
    Public usri2_password As String
    Public usri2_password_age As UInteger
    Public usri2_priv As UInteger
    <MarshalAs(UnmanagedType.LPWStr)>
    Public usri2_home_dir As String
    <MarshalAs(UnmanagedType.LPWStr)>
    Public usri2_comment As String
    Public usri2_flags As UInteger
    <MarshalAs(UnmanagedType.LPWStr)>
    Public usri2_script_path As String
    Public usri2_auth_flags As UInteger
    <MarshalAs(UnmanagedType.LPWStr)>
    Public usri2_full_name As String
    <MarshalAs(UnmanagedType.LPWStr)>
    Public usri2_usr_comment As String
    <MarshalAs(UnmanagedType.LPWStr)>
    Public usri2_parms As String
    <MarshalAs(UnmanagedType.LPWStr)>
    Public usri2_workstations As String
    Public usri2_last_logon As UInteger
    Public usri2_last_logoff As UInteger
    Public usri2_acct_expires As UInteger
    Public usri2_max_storage As UInteger
    Public usri2_units_per_week As UInteger
    Public usri2_logon_hours As IntPtr
    Public usri2_bad_pw_count As UInteger
    Public usri2_num_logons As UInteger
    <MarshalAs(UnmanagedType.LPWStr)>
    Public usri2_logon_server As String
    Public usri2_country_code As UInteger
    Public usri2_code_page As UInteger
    End Structure

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions