Beispiel #1
0
        public DdcInfo DdcInfo(uint index)
        {
            var size = Marshal.SizeOf(typeof(NativeDefinitions.G3XDDC_DDC_INFO));
            var ptr  = Marshal.AllocHGlobal(size);

            try
            {
                Check(_api.GetDdcInfo(GetHandle(), index, ptr));
                var nativeInfo =
                    (NativeDefinitions.G3XDDC_DDC_INFO)
                    Marshal.PtrToStructure(ptr, typeof(NativeDefinitions.G3XDDC_DDC_INFO));
                return(new DdcInfo(nativeInfo));
            }
            finally
            {
                Marshal.FreeHGlobal(ptr);
            }
        }