<PICKYPICKY>
  for (i = 0; i <= iLength; i++) 
Did you want the number of iterations to be iLength, or iLength +1 (what
you have there)?
          Mem[i+addr] = (uchar) *pstrBuffer+i; 
Did you want to add i to the pointer and retrieve what the resulting
pointer points to, or did you want to retrieve what the pointer points to,
and then add i to that value?
</PICKYPICKY>
--
Grumpy Ol' Fred        cisin(a)xenosoft.com