Beispiel #1
0
        /// <summary>
        /// Gets information about a device image for use in a configuration property sheet.
        /// </summary>
        /// <returns>A structure that receives information about the device image.</returns>
        public DeviceImageHeader GetDeviceImages()
        {
            var imageHeader = new DeviceImageHeader();

            GetImageInfo(imageHeader);

            if (imageHeader.BufferUsed > 0)
            {
                unsafe
                {
                    imageHeader.BufferSize = imageHeader.BufferUsed;
                    var pImages = stackalloc DeviceImage.__Native[imageHeader.BufferSize / sizeof(DeviceImage.__Native)];
                    imageHeader.ImageInfoArrayPointer = (IntPtr)pImages;
                }
                GetImageInfo(imageHeader);
            }
            return(imageHeader);
        }
Beispiel #2
0
        /// <summary>
        /// Gets information about a device image for use in a configuration property sheet.
        /// </summary>
        /// <returns>A structure that receives information about the device image.</returns>
        public DeviceImageHeader GetDeviceImages()
        {
            var imageHeader = new DeviceImageHeader();
            GetImageInfo(imageHeader);

            if (imageHeader.BufferUsed > 0)
            {
                unsafe
                {
                    imageHeader.BufferSize = imageHeader.BufferUsed;
                    var pImages = stackalloc DeviceImage.__Native[imageHeader.BufferSize/sizeof (DeviceImage.__Native)];
                    imageHeader.ImageInfoArrayPointer = (IntPtr)pImages;
                }
                GetImageInfo(imageHeader);
            }
            return imageHeader;
        }