Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenlocal_group.c
Go to the documentation of this file.
00001 /* 00002 * Copyright 2006 Robert Reif 00003 * 00004 * netapi32 local group functions 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00019 */ 00020 00021 #include <stdarg.h> 00022 00023 #include "ntstatus.h" 00024 #define WIN32_NO_STATUS 00025 #include "windef.h" 00026 #include "winbase.h" 00027 #include "winerror.h" 00028 #include "lmcons.h" 00029 #include "lmaccess.h" 00030 #include "lmapibuf.h" 00031 #include "lmerr.h" 00032 #include "winreg.h" 00033 #include "ntsecapi.h" 00034 #include "wine/debug.h" 00035 #include "wine/unicode.h" 00036 00037 WINE_DEFAULT_DEBUG_CHANNEL(netapi32); 00038 00039 /************************************************************ 00040 * NetLocalGroupAdd (NETAPI32.@) 00041 */ 00042 NET_API_STATUS WINAPI NetLocalGroupAdd( 00043 LPCWSTR servername, 00044 DWORD level, 00045 LPBYTE buf, 00046 LPDWORD parm_err) 00047 { 00048 FIXME("(%s %d %p %p) stub!\n", debugstr_w(servername), level, buf, 00049 parm_err); 00050 return NERR_Success; 00051 } 00052 00053 /************************************************************ 00054 * NetLocalGroupAddMember (NETAPI32.@) 00055 */ 00056 NET_API_STATUS WINAPI NetLocalGroupAddMember( 00057 LPCWSTR servername, 00058 LPCWSTR groupname, 00059 PSID membersid) 00060 { 00061 FIXME("(%s %s %p) stub!\n", debugstr_w(servername), 00062 debugstr_w(groupname), membersid); 00063 return NERR_Success; 00064 } 00065 00066 /************************************************************ 00067 * NetLocalGroupAddMembers (NETAPI32.@) 00068 */ 00069 NET_API_STATUS WINAPI NetLocalGroupAddMembers( 00070 LPCWSTR servername, 00071 LPCWSTR groupname, 00072 DWORD level, 00073 LPBYTE buf, 00074 DWORD totalentries) 00075 { 00076 FIXME("(%s %s %d %p %d) stub!\n", debugstr_w(servername), 00077 debugstr_w(groupname), level, buf, totalentries); 00078 return NERR_Success; 00079 } 00080 00081 /************************************************************ 00082 * NetLocalGroupDel (NETAPI32.@) 00083 */ 00084 NET_API_STATUS WINAPI NetLocalGroupDel( 00085 LPCWSTR servername, 00086 LPCWSTR groupname) 00087 { 00088 FIXME("(%s %s) stub!\n", debugstr_w(servername), debugstr_w(groupname)); 00089 return NERR_Success; 00090 } 00091 00092 /************************************************************ 00093 * NetLocalGroupDelMember (NETAPI32.@) 00094 */ 00095 NET_API_STATUS WINAPI NetLocalGroupDelMember( 00096 LPCWSTR servername, 00097 LPCWSTR groupname, 00098 PSID membersid) 00099 { 00100 FIXME("(%s %s %p) stub!\n", debugstr_w(servername), 00101 debugstr_w(groupname), membersid); 00102 return NERR_Success; 00103 } 00104 00105 /************************************************************ 00106 * NetLocalGroupDelMembers (NETAPI32.@) 00107 */ 00108 NET_API_STATUS WINAPI NetLocalGroupDelMembers( 00109 LPCWSTR servername, 00110 LPCWSTR groupname, 00111 DWORD level, 00112 LPBYTE buf, 00113 DWORD totalentries) 00114 { 00115 FIXME("(%s %s %d %p %d) stub!\n", debugstr_w(servername), 00116 debugstr_w(groupname), level, buf, totalentries); 00117 return NERR_Success; 00118 } 00119 00120 /************************************************************ 00121 * NetLocalGroupEnum (NETAPI32.@) 00122 */ 00123 NET_API_STATUS WINAPI NetLocalGroupEnum( 00124 LPCWSTR servername, 00125 DWORD level, 00126 LPBYTE* bufptr, 00127 DWORD prefmaxlen, 00128 LPDWORD entriesread, 00129 LPDWORD totalentries, 00130 PDWORD_PTR resumehandle) 00131 { 00132 FIXME("(%s %d %p %d %p %p %p) stub!\n", debugstr_w(servername), 00133 level, bufptr, prefmaxlen, entriesread, totalentries, resumehandle); 00134 *entriesread = 0; 00135 *totalentries = 0; 00136 return NERR_Success; 00137 } 00138 00139 /************************************************************ 00140 * NetLocalGroupGetInfo (NETAPI32.@) 00141 */ 00142 NET_API_STATUS WINAPI NetLocalGroupGetInfo( 00143 LPCWSTR servername, 00144 LPCWSTR groupname, 00145 DWORD level, 00146 LPBYTE* bufptr) 00147 { 00148 FIXME("(%s %s %d %p) stub!\n", debugstr_w(servername), 00149 debugstr_w(groupname), level, bufptr); 00150 return NERR_Success; 00151 } 00152 00153 /************************************************************ 00154 * NetLocalGroupGetMembers (NETAPI32.@) 00155 */ 00156 NET_API_STATUS WINAPI NetLocalGroupGetMembers( 00157 LPCWSTR servername, 00158 LPCWSTR localgroupname, 00159 DWORD level, 00160 LPBYTE* bufptr, 00161 DWORD prefmaxlen, 00162 LPDWORD entriesread, 00163 LPDWORD totalentries, 00164 PDWORD_PTR resumehandle) 00165 { 00166 FIXME("(%s %s %d %p %d, %p %p %p) stub!\n", debugstr_w(servername), 00167 debugstr_w(localgroupname), level, bufptr, prefmaxlen, entriesread, 00168 totalentries, resumehandle); 00169 00170 if (level == 3) 00171 { 00172 WCHAR userName[MAX_COMPUTERNAME_LENGTH + 1]; 00173 DWORD userNameLen; 00174 DWORD len,needlen; 00175 PLOCALGROUP_MEMBERS_INFO_3 ptr; 00176 00177 /* still a stub, current user is belonging to all groups */ 00178 00179 *totalentries = 1; 00180 *entriesread = 0; 00181 00182 userNameLen = MAX_COMPUTERNAME_LENGTH + 1; 00183 GetUserNameW(userName,&userNameLen); 00184 needlen = sizeof(LOCALGROUP_MEMBERS_INFO_3) + 00185 (userNameLen+2) * sizeof(WCHAR); 00186 if (prefmaxlen != MAX_PREFERRED_LENGTH) 00187 len = min(prefmaxlen,needlen); 00188 else 00189 len = needlen; 00190 00191 NetApiBufferAllocate(len, (LPVOID *) bufptr); 00192 if (len < needlen) 00193 return ERROR_MORE_DATA; 00194 00195 ptr = (PLOCALGROUP_MEMBERS_INFO_3)*bufptr; 00196 ptr->lgrmi3_domainandname = (LPWSTR)(*bufptr+sizeof(LOCALGROUP_MEMBERS_INFO_3)); 00197 lstrcpyW(ptr->lgrmi3_domainandname,userName); 00198 00199 *entriesread = 1; 00200 } 00201 00202 return NERR_Success; 00203 } 00204 00205 /************************************************************ 00206 * NetLocalGroupSetInfo (NETAPI32.@) 00207 */ 00208 NET_API_STATUS WINAPI NetLocalGroupSetInfo( 00209 LPCWSTR servername, 00210 LPCWSTR groupname, 00211 DWORD level, 00212 LPBYTE buf, 00213 LPDWORD parm_err) 00214 { 00215 FIXME("(%s %s %d %p %p) stub!\n", debugstr_w(servername), 00216 debugstr_w(groupname), level, buf, parm_err); 00217 return NERR_Success; 00218 } 00219 00220 /************************************************************ 00221 * NetLocalGroupSetMember (NETAPI32.@) 00222 */ 00223 NET_API_STATUS WINAPI NetLocalGroupSetMembers( 00224 LPCWSTR servername, 00225 LPCWSTR groupname, 00226 DWORD level, 00227 LPBYTE buf, 00228 DWORD totalentries) 00229 { 00230 FIXME("(%s %s %d %p %d) stub!\n", debugstr_w(servername), 00231 debugstr_w(groupname), level, buf, totalentries); 00232 return NERR_Success; 00233 } Generated on Sun May 27 2012 04:25:27 for ReactOS by
1.7.6.1
|