/// <summary> /// The SamrSetInformationGroup method updates attributes /// on a group object. Opnum: 21 /// </summary> /// <param name="GroupHandle"> /// An RPC context handle, as specified in section , representing /// a group object. /// </param> /// <param name="GroupInformationClass"> /// An enumeration indicating which attributes to update. /// See section for a listing of possible values. /// </param> /// <param name="Buffer"> /// The requested attributes and values to update. See section /// for structure details. /// </param> /// <returns> /// status of the function call, for example: 0 indicates STATUS_SUCCESS /// </returns> public int SamrSetInformationGroup( IntPtr GroupHandle, _GROUP_INFORMATION_CLASS GroupInformationClass, _SAMPR_GROUP_INFO_BUFFER Buffer) { const ushort opnum = 21; Int3264[] paramList; int retVal = 0; SafeIntPtr pBuffer = TypeMarshal.ToIntPtr(Buffer, GroupInformationClass, null, null); paramList = new Int3264[] { GroupHandle, (int)GroupInformationClass, pBuffer, IntPtr.Zero }; try { using (RpceInt3264Collection outParamList = RpceCall(paramList, opnum)) { retVal = outParamList[3].ToInt32(); } } finally { pBuffer.Dispose(); } return retVal; }
/// <summary> /// The SamrSetInformationGroup method updates attributes /// on a group object. Opnum: 21 /// </summary> /// <param name="GroupHandle"> /// An RPC context handle, as specified in section , representing /// a group object. /// </param> /// <param name="GroupInformationClass"> /// An enumeration indicating which attributes to update. /// See section for a listing of possible values. /// </param> /// <param name="Buffer"> /// The requested attributes and values to update. See section /// for structure details. /// </param> /// <returns> /// status of the function call, for example: 0 indicates STATUS_SUCCESS /// </returns> public int SamrSetInformationGroup(System.IntPtr GroupHandle, _GROUP_INFORMATION_CLASS GroupInformationClass, //[Switch("GroupInformationClass")] _SAMPR_GROUP_INFO_BUFFER Buffer) { return rpc.SamrSetInformationGroup(GroupHandle, GroupInformationClass, Buffer); }
/// <summary> /// The SamrQueryInformationGroup method obtains attributes /// from a group object. Opnum: 20 /// </summary> /// <param name="GroupHandle"> /// An RPC context handle, as specified in section , representing /// a group object. /// </param> /// <param name="GroupInformationClass"> /// An enumeration indicating which attributes to return. /// See section for a listing of possible values. /// </param> /// <param name="Buffer"> /// The requested attributes on output. See section for /// structure details. /// </param> /// <returns> /// status of the function call, for example: 0 indicates STATUS_SUCCESS /// </returns> public int SamrQueryInformationGroup( IntPtr GroupHandle, _GROUP_INFORMATION_CLASS GroupInformationClass, out _SAMPR_GROUP_INFO_BUFFER? Buffer) { const ushort opnum = 20; Int3264[] paramList; int retVal = 0; paramList = new Int3264[] { GroupHandle, (int)GroupInformationClass, IntPtr.Zero, IntPtr.Zero }; using (RpceInt3264Collection outParamList = RpceCall(paramList, opnum)) { Buffer = TypeMarshal.ToNullableStruct<_SAMPR_GROUP_INFO_BUFFER>( Marshal.ReadIntPtr(outParamList[2]), GroupInformationClass, null, null); retVal = outParamList[3].ToInt32(); } return retVal; }