From: corinna DOT vinschen AT cityweb DOT de (Corinna Vinschen) Subject: Patch: Added definitions for usage of 'NetUser...()' functions 1 Jan 1999 06:53:57 -0800 Message-ID: <368CD8CA.8C2D3205.cygnus.cygwin32.developers@cityweb.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: cygwin32-developers AT cygnus DOT com Hi, I have added some definitions to the Windows32 headers, to use the NetUser...() functionality. Regards, Corinna ChangeLog: ========== Wed Dec 30 23:23:18 1998 Corinna Vinschen * include/Windows32/Defines.h: Added definition for ENCRYPTED_PWLEN. * include/Windows32/Structures.h: Added definitions for every USER_INFO structure. * include/Windows32/CommonFunctions.h: Added declarations for NetUserSetInfo(), NetUserAdd() and NetUserDel(). ------ snip ------ Index: CommonFunctions.h =================================================================== RCS file: /src/cvsroot/winsup-981230/include/Windows32/CommonFunctions.h,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 CommonFunctions.h --- CommonFunctions.h 1998/12/30 23:02:01 1.1.1.1 +++ CommonFunctions.h 1998/12/30 23:22:45 @@ -6755,7 +6755,10 @@ DWORD STDCALL NetUserEnum (LPWSTR, DWORD LPDWORD, LPDWORD); DWORD STDCALL NetApiBufferFree (LPVOID); DWORD STDCALL NetUserGetInfo (LPWSTR, LPWSTR, DWORD, LPBYTE); +DWORD STDCALL NetUserSetInfo (LPWSTR, LPWSTR, DWORD, LPBYTE, LPDWORD); DWORD STDCALL NetUserChangePassword (LPWSTR, LPWSTR, LPWSTR, LPWSTR); +DWORD STDCALL NetUserAdd (LPWSTR, DWORD, LPBYTE, LPDWORD); +DWORD STDCALL NetUserDel (LPWSTR, LPWSTR); DWORD STDCALL NetGetDCName (LPWSTR, LPWSTR, LPBYTE*); DWORD STDCALL NetGroupEnum (LPWSTR, DWORD, LPBYTE*, DWORD, LPDWORD, LPDWORD, LPDWORD); Index: Defines.h =================================================================== RCS file: /src/cvsroot/winsup-981230/include/Windows32/Defines.h,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 Defines.h --- Defines.h 1998/12/30 23:02:01 1.1.1.1 +++ Defines.h 1998/12/30 23:23:06 @@ -5369,6 +5369,8 @@ DECLARE_HANDLE(HANDLE); #define IMAGE_DOS_SIGNATURE (0x5a4d) /* e_magic field */ #define IMAGE_NT_SIGNATURE (0x4550) /* nt_signature field */ +#define ENCRYPTED_PWLEN 16 + #ifdef __cplusplus } #endif /* __cplusplus */ Index: Structures.h =================================================================== RCS file: /src/cvsroot/winsup-981230/include/Windows32/Structures.h,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 Structures.h --- Structures.h 1998/12/30 23:02:01 1.1.1.1 +++ Structures.h 1998/12/30 23:37:45 @@ -4607,6 +4607,22 @@ typedef struct tagPIXELFORMATDESCRIPTOR typedef struct { + LPWSTR usri0_name; +} USER_INFO_0, *PUSER_INFO_0, *LPUSER_INFO_0; + +typedef struct +{ + LPWSTR usri1_name; + LPWSTR usri1_password; + DWORD usri1_password_age; + DWORD usri1_priv; + LPWSTR usri1_home_dir; + LPWSTR usri1_comment; + DWORD usri1_flags; +} USER_INFO_1, *PUSER_INFO_1, *LPUSER_INFO_1; + +typedef struct +{ LPWSTR usri2_name; LPWSTR usri2_password; DWORD usri2_password_age; @@ -4635,11 +4651,6 @@ typedef struct typedef struct { - LPWSTR usri0_name; -} USER_INFO_0, *PUSER_INFO_0, *LPUSER_INFO_0; - -typedef struct -{ LPWSTR usri3_name; LPWSTR usri3_password; DWORD usri3_password_age; @@ -4670,6 +4681,120 @@ typedef struct LPWSTR usri3_home_dir_drive; DWORD usri3_password_expired; } USER_INFO_3, *PUSER_INFO_3, *LPUSER_INFO_3; + +typedef struct +{ + BYTE usri21_password[ENCRYPTED_PWLEN]; +} USER_INFO_21, *PUSER_INFO_21, *LPUSER_INFO_21; + +typedef struct +{ + LPWSTR usri22_name; + LPWSTR usri22_password[ENCRYPTED_PWLEN]; + DWORD usri22_password_age; + DWORD usri22_priv; + LPWSTR usri22_home_dir; + LPWSTR usri22_comment; + DWORD usri22_flags; + LPWSTR usri22_script_path; + DWORD usri22_auth_flags; + LPWSTR usri22_full_name; + LPWSTR usri22_usr_comment; + LPWSTR usri22_parms; + LPWSTR usri22_workstations; + DWORD usri22_last_logon; + DWORD usri22_last_logoff; + DWORD usri22_acct_expires; + DWORD usri22_max_storage; + DWORD usri22_units_per_week; + PBYTE usri22_logon_hours; + DWORD usri22_bad_pw_count; + DWORD usri22_num_logons; + LPWSTR usri22_logon_server; + DWORD usri22_country_code; + DWORD usri22_code_page; +} USER_INFO_22, *PUSER_INFO_22, *LPUSER_INFO_22; + +typedef struct +{ + LPWSTR usri1003_password; +} USER_INFO_1003, *PUSER_INFO_1003, *LPUSER_INFO_1003; + +typedef struct +{ + DWORD usri1005_priv; +} USER_INFO_1005, *PUSER_INFO_1005, *LPUSER_INFO_1005; + +typedef struct +{ + LPWSTR usri1006_home_dir; +} USER_INFO_1006, *PUSER_INFO_1006, *LPUSER_INFO_1006; + +typedef struct +{ + LPWSTR usri1007_comment; +} USER_INFO_1007, *PUSER_INFO_1007, *LPUSER_INFO_1007; + +typedef struct +{ + DWORD usri1008_flags; +} USER_INFO_1008, *PUSER_INFO_1008, *LPUSER_INFO_1008; + +typedef struct +{ + LPWSTR usri1009_script_path; +} USER_INFO_1009, *PUSER_INFO_1009, *LPUSER_INFO_1009; + +typedef struct +{ + DWORD usri1010_auth_flags; +} USER_INFO_1010, *PUSER_INFO_1010, *LPUSER_INFO_1010; + +typedef struct +{ + LPWSTR usri1011_full_name; +} USER_INFO_1011, *PUSER_INFO_1011, *LPUSER_INFO_1011; + +typedef struct +{ + LPWSTR usri1012_usr_comment; +} USER_INFO_1012, *PUSER_INFO_1012, *LPUSER_INFO_1012; + +typedef struct +{ + LPWSTR usri1013_parms; +} USER_INFO_1013, *PUSER_INFO_1013, *LPUSER_INFO_1013; + +typedef struct +{ + LPWSTR usri1014_workstations; +} USER_INFO_1014, *PUSER_INFO_1014, *LPUSER_INFO_1014; + +typedef struct +{ + DWORD usri1017_acct_expires; +} USER_INFO_1017, *PUSER_INFO_1017, *LPUSER_INFO_1017; + +typedef struct +{ + DWORD usri1020_units_per_week; + LPBYTE usri1020_logon_hours; +} USER_INFO_1020, *PUSER_INFO_1020, *LPUSER_INFO_1020; + +typedef struct +{ + DWORD usri1024_country_code; +} USER_INFO_1024, *PUSER_INFO_1024, *LPUSER_INFO_1024; + +typedef struct +{ + DWORD usri1051_primary_group_id; +} USER_INFO_1051, *PUSER_INFO_1051, *LPUSER_INFO_1051; + +typedef struct +{ + LPWSTR usri1053_home_dir_drive; +} USER_INFO_1053, *PUSER_INFO_1053, *LPUSER_INFO_1053; typedef struct {