public static AfcError afc_get_device_info(AfcClientHandle client, out System.Collections.ObjectModel.ReadOnlyCollection <string> deviceInformation)
        {
            System.Runtime.InteropServices.ICustomMarshaler deviceInformationMarshaler = AfcDictionaryMarshaler.GetInstance(null);
            System.IntPtr deviceInformationNative = System.IntPtr.Zero;
            AfcError      returnValue             = AfcNativeMethods.afc_get_device_info(client, out deviceInformationNative);

            deviceInformation = ((System.Collections.ObjectModel.ReadOnlyCollection <string>)deviceInformationMarshaler.MarshalNativeToManaged(deviceInformationNative));
            deviceInformationMarshaler.CleanUpNativeData(deviceInformationNative);
            return(returnValue);
        }
예제 #2
0
 /// <summary>
 /// Get device information for a connected client. The device information
 /// returned is the device model as well as the free space, the total capacity
 /// and blocksize on the accessed disk partition.
 /// </summary>
 /// <param name="client">
 /// The client to get device info for.
 /// </param>
 /// <param name="device_information">
 /// A char list of device information terminated by an
 /// empty string or NULL if there was an error. Free with
 /// afc_dictionary_free().
 /// </param>
 /// <returns>
 /// AFC_E_SUCCESS on success or an AFC_E_* error value.
 /// </returns>
 public virtual AfcError afc_get_device_info(AfcClientHandle client, out System.Collections.ObjectModel.ReadOnlyCollection <string> deviceInformation)
 {
     return(AfcNativeMethods.afc_get_device_info(client, out deviceInformation));
 }