/// <summary>
 /// Initializes a new instance of the <see cref="DeviceInterfaceDetail"/> class.
 /// </summary>
 /// <param name="deviceInformationSetHandle">
 /// The device Information Set Handle.
 /// </param>
 /// <param name="size">
 /// The size.
 /// </param>
 /// <param name="marshalWrapper">
 /// The marshal Wrapper.
 /// </param>
 /// <param name="deviceInfoDataFactory">
 /// The device Info Data Factory.
 /// </param>
 /// <param name="unsafeNativeMethodsWrapper">
 /// The unsafe Native Methods Wrapper.
 /// </param>
 public DeviceInterfaceDetail(
     IntPtr deviceInformationSetHandle, 
     int size, 
     IMarshalWrapper marshalWrapper, 
     IDeviceInfoDataFactory deviceInfoDataFactory, 
     IUnsafeNativeMethodsWrapper unsafeNativeMethodsWrapper)
 {
     _deviceInformationSetHandle = deviceInformationSetHandle;
     DeviceInfoData = deviceInfoDataFactory.Create();
     _marshalWrapper = marshalWrapper;
     _unsafeNativeMethodsWrapper = unsafeNativeMethodsWrapper;
     DeviceInterfaceDetailBuffer = Marshal.AllocHGlobal(size);
     _marshalWrapper.WriteInteger32(DeviceInterfaceDetailBuffer, (IntPtr.Size == 4) ? (4 + Marshal.SystemDefaultCharSize) : 8);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DeviceInterfaceDetail"/> class.
 /// </summary>
 /// <param name="deviceInformationSetHandle">
 /// The device Information Set Handle.
 /// </param>
 /// <param name="size">
 /// The size.
 /// </param>
 /// <param name="marshalWrapper">
 /// The marshal Wrapper.
 /// </param>
 /// <param name="deviceInfoDataFactory">
 /// The device Info Data Factory.
 /// </param>
 /// <param name="unsafeNativeMethodsWrapper">
 /// The unsafe Native Methods Wrapper.
 /// </param>
 public DeviceInterfaceDetail(
     IntPtr deviceInformationSetHandle,
     int size,
     IMarshalWrapper marshalWrapper,
     IDeviceInfoDataFactory deviceInfoDataFactory,
     IUnsafeNativeMethodsWrapper unsafeNativeMethodsWrapper)
 {
     _deviceInformationSetHandle = deviceInformationSetHandle;
     DeviceInfoData              = deviceInfoDataFactory.Create();
     _marshalWrapper             = marshalWrapper;
     _unsafeNativeMethodsWrapper = unsafeNativeMethodsWrapper;
     DeviceInterfaceDetailBuffer = Marshal.AllocHGlobal(size);
     _marshalWrapper.WriteInteger32(DeviceInterfaceDetailBuffer, (IntPtr.Size == 4) ? (4 + Marshal.SystemDefaultCharSize) : 8);
 }