AForge.Video.DirectShow.Internals.CAUUID.ToGuidArray C# (CSharp) Method

ToGuidArray() public method

Performs manual marshaling of pElems to retrieve an array of Guid objects.
public ToGuidArray ( ) : System.Guid[]
return System.Guid[]
        public Guid[] ToGuidArray( )
        {
            Guid[] retval = new Guid[cElems];

            for ( int i = 0; i < cElems; i++ )
            {
                IntPtr ptr = new IntPtr( pElems.ToInt64( ) + i * Marshal.SizeOf( typeof( Guid ) ) );
                retval[i] = (Guid) Marshal.PtrToStructure( ptr, typeof( Guid ) );
            }

            return retval;
        }
    }