aArray->QueryElementAt(i, NS_GET_IID(nsIFile), &(array[i]));
aArray->QueryElementAt(i, NS_GET_IID(nsIFile), (void**)&(array[i]));
nsFileView::SortArray(nsISupportsArray* aArray){  // We assume the array to be in filesystem order, which  // for our purposes, is completely unordered.  int (*compareFunc)(const void*, const void*, void*);  switch (mSortType) {  case sortName:    compareFunc = SortNameCallback;    break;  case sortSize:    compareFunc = SortSizeCallback;    break;  case sortDate:    compareFunc = SortDateCallback;    break;  default:    return;  }  PRUint32 count;  aArray->Count(&count);  // each item will have an additional refcount while  // the array is alive.  nsIFile** array = new nsIFile*[count];  PRUint32 i;  for (i = 0; i < count; ++i)    aArray->QueryElementAt(i, NS_GET_IID(nsIFile), &(array[i]));  NS_QuickSort(array, count, sizeof(nsIFile*), compareFunc, nsnull);  for (i = 0; i < count; ++i) {    aArray->ReplaceElementAt(array[i], i);    NS_RELEASE(array[i]);  }  delete[] array;}