I am trying to figure out how to properly construct a multi-language project. A simple one, and no it is not homework, such as a VB or C# form with a button and 2 listboxes. When the button is clicked, the left listbox displays the unsorted array and the right listbox displays the sorted array. Now this is easy enough to do in the same langauge but, if I write code for a bubblesort in C++ and try to call the C++ bubblesort function from VB or C# I get an error stating that the sortArray function (the C++ code) is not a member of BubbleSort. Can anyone help and possibly provide an example of how to write a multi-language project? All we ever hear is that it can be done in .NET but no book ever give you a clear example. I did compile the BubbleSort as a .dll and add it as a reference to my VB and C# (I tried them Both) forms but it still does not work. I will place the code for both projects below. Thanks for any help you can offer.

Code:
private void button1_Click(object sender, System.EventArgs e)
{
   listBox1.Items.Add("The Unsorted Array:");
			
   int[] unsortedArray = {72, 87, 32, 11, 6, 100, 91, 29, 81, 10};
   int[] sortedArray = new int[unsortedArray.Length];

   for (int i = 0; i < unsortedArray.Length; i++)
   {
       listBox1.Items.Add(unsortedArray[i]);
   }

  //call to C++ project to sort the array
   sortedArray = BubbleSort2.sortArray(unsortedArray,   
       unsortedArray.Length);


   listBox2.Items.Add("The Sorted Array:");

}// end button1_click

   //Bubble sort code
void sortArray(int data[], int elems)
{
   int curSize = elems;
   int temp;

   bool swap = false;

   //for loop to process the array
   // decrements the loop after each pass
   for(curSize = elems; curSize >= 0; curSize--)
   {
       for(int i = 0; i <= elems; i++)
      {
         swap = true;
       
         // this checks to see if an array element is 
        // out of order and makes the swap.
        if(data[i] > data[i +1]) 				
        {
            temp = data[i];
            data[i] = data [i + 1];
            data[i+1] = temp;
        }//end if
     }//end for loop
    
      // breaks out of the loop when there is no more 
      // swapping to be done
      if(!swap) break;
}//end function sortArray
I hope that I have made the problem clear. I am just trying to figure out how to work with multiple language projects.

Thanks,
Alan