To call virtual_copy you have to first construct the parameters. First, the two struct vir_addr parameters specifying source virtual address and the destination virtual address need to be built. Here is that struct's definition:
struct vir_addr { int proc_nr_e; int segment; vir_bytes offset; }; proc_nr_e: endpoint value of the process segment: This should be T, D, or S (0,1, or 2) T for Text, D for Data, S for Stack offset: Byte offset from the beginning of the segment.
These must of course be set correctly in order for virtual_copy to work. Several tests are made in that function and the most likely result is an error code return value if the parameters are not set up as expected.