[fix][RAPIS.cs] Overflow in CopyFileToDevice on x64 desktop

Jul 8, 2010 at 11:23 AM
Edited Jul 8, 2010 at 11:25 AM
line 447: actually the return value is casted with a int32 that result in an overflow if the number is to big. so the file is created but no data is written due to exception.
Jul 8, 2010 at 11:25 AM
Edited Jul 8, 2010 at 11:41 AM
remoteFile = CeCreateFile(RemoteFileName, GENERIC_WRITE, 0 , 0, create, FILE_ATTRIBUTE_NORMAL, 0);
	
// check for success
if (remoteFile.ToInt64() <= 0)
{
        throw new RAPIException("Could not create remote file");
}