コード例 #1
0
 public static extern WindowsError NetLocalGroupEnum(
     string servername,
     uint level,
     out NetApiBufferHandle bufptr,
     uint prefmaxlen,
     out uint entriesread,
     out uint totalentries,
     IntPtr resumehandle);
コード例 #2
0
 public static extern WindowsError NetUserEnum(
     string servername,
     uint level,
     UserEnumFilter filter,
     out NetApiBufferHandle bufptr,
     uint prefmaxlen,
     out uint entriesread,
     out uint totalentries,
     IntPtr resume_handle);
コード例 #3
0
        private static IEnumerable <T> ReadStructsFromBuffer <T>(NetApiBufferHandle buffer, uint count) where T : struct
        {
            uint size  = (uint)Marshal.SizeOf <T>();
            var  items = new List <T>((int)count);

            buffer.Initialize(numElements: count, sizeOfEachElement: size);

            for (uint i = 0; i < count; i++)
            {
                var current = buffer.Read <T>(i * size);
                items.Add(current);
            }

            return(items);
        }
コード例 #4
0
 public static extern WindowsError NetUserGetInfo(
     string servername,
     string username,
     uint level,
     out NetApiBufferHandle bufptr);