/// <summary> /// Advances the enumerator to the next element of the collection. /// </summary> /// <returns> /// true if the enumerator was successfully advanced to the next element; false if the enumerator has passed the end of the collection. /// </returns> public bool MoveNext() { if (this.database != null) { lock (this.database.IsamSession) { // filter out anything that is not a normal table ObjectInfoFlags flags = 0; do { this.MoveNext_(); if (this.current) { flags = (ObjectInfoFlags)Api.RetrieveColumnAsUInt32( this.database.IsamSession.Sesid, this.objectList.tableid, this.objectList.columnidflags); } }while (this.current && (flags & (ObjectInfoFlags.System | ObjectInfoFlags.TableTemplate)) != 0); return(this.current); } } else { return(this.enumerator.MoveNext()); } }
internal Guid ObjectType; // ignored unless ObjectInfoFlags.ObjectGuid is set internal ObjectInfo( ObjectInfoFlags flags, string serverName, string objectName, string pageTitle) { this.Flags = flags; this.ServerName = serverName; this.ObjectName = objectName; this.PageTitle = pageTitle; this.ObjectType = Guid.Empty; this.hInstance = IntPtr.Zero; if (this.PageTitle != null) { this.Flags = this.Flags | ObjectInfoFlags.PageTitle; } }
public void GetAccessRights( ref Guid pguidObjectType, ObjectInfoFlags dwFlags, [MarshalAs(UnmanagedType.LPArray)] out Access[] ppAccess, out int pcAccesses, out int piDefaultAccess) { // should set objectType to the pguidObjectType, but we don't need that // => we leave objectType as Guid.Empty Guid objectType = Guid.Empty; AccessRightsWrapper accessRights = model.GetAccessRights(objectType, dwFlags); Access[] access = accessRights.access; ppAccess = access; pcAccesses = (int)access.Length; piDefaultAccess = (int)accessRights.DefaultIndex; }
public AccessRights GetAccessRights(ValueType objectType, ObjectInfoFlags flags) { AccessRights rights = new AccessRights(); Access[] access = rights.Access = new Access[17]; // these aliases should make the code more readable // for the magazine edition (we don't get much width!) AccessFlags G = AccessFlags.General; AccessFlags S = AccessFlags.Specific; // summary page permissions access[0] = new Access(SERVICE_ALL, "Full Control", G | S); access[1] = new Access(SERVICE_READ, "Read", G); access[2] = new Access(SERVICE_WRITE, "Write", G); access[3] = new Access(SERVICE_EXECUTE, "Execute", G); // advanced page permissions access[4] = new Access(0x0001, "Query Configuration", S); access[5] = new Access(0x0002, "Change Configuration", S); access[6] = new Access(0x0004, "Query Status", S); access[7] = new Access(0x0008, "Enumerate Dependents", S); access[8] = new Access(0x0010, "Start", S); access[9] = new Access(0x0020, "Stop", S); access[10] = new Access(0x0040, "Pause or Continue", S); access[11] = new Access(0x0080, "Interrogate", S); access[12] = new Access(0x0100, "Send User Defined Control", S); access[13] = new Access(0x00010000, "Delete", S); access[14] = new Access(0x00020000, "Read Permissions", S); access[15] = new Access(0x00040000, "Change Permissions", S); access[16] = new Access(0x00080000, "Take Ownership", S); // note how I refer to access[1] as the default ("Read") rights.DefaultIndex = 1; return rights; }
// define the access rights // we do not use the GUID (it is usefull only when using AD style objects public AccessRightsWrapper GetAccessRights(Guid objectType, ObjectInfoFlags flags) { return accessRights; }
// define the access rights // we do not use the GUID (it is usefull only when using AD style objects public AccessRightsWrapper GetAccessRights(Guid objectType, ObjectInfoFlags flags) { return(accessRights); }