xboxscene.org forums

Author Topic: Openxdk File... Stuff  (Read 55 times)

MrJennings

  • Archived User
  • Newbie
  • *
  • Posts: 4
Openxdk File... Stuff
« on: March 10, 2005, 11:38:00 PM »

CODE

int XCopyFile(char *src, char *dest)
{
   FILE * fin, * fout;
   unsigned char buffer[1000];
   size_t count;

   fin = fopen(src, "rb");
   if (fin == NULL)
      return 1;

   fout = fopen(dest, "wb");
   if (fout == NULL)
      return 2;
      
   while (!feof(fin)) {
      count = fread(buffer, 1, 1000, fin);
      if(count==0)
         break;
      fwrite(buffer, 1, count, fout);
   }

   fclose(fin);
   fclose(fout);

   return 0;
}


And when I mount it to C:test it cant find C:\test\default.xbe
Logged